163 references to WRN_NullabilityMismatchInTypeParameterConstraint
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
40
nullableWarnings.Add(GetId(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
));
445
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
:
1916
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
:
Generated\ErrorFacts.Generated.cs (1)
219
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
:
Symbols\ConstraintsHelper.cs (1)
1079
nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, containingSymbol.ConstructedFrom(), constraintType, typeParameter, typeArgument))));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (8)
Attributes\AttributeTests_Nullable.cs (8)
1376
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A?").WithArguments("D<T>", "A", "T", "A?").WithLocation(10, 15),
1379
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "B?").WithArguments("D<T>", "A", "T", "B?").WithLocation(12, 15));
1385
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A?").WithArguments("D<T>", "A", "T", "A?").WithLocation(10, 15),
1388
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "B?").WithArguments("D<T>", "A", "T", "B?").WithLocation(12, 15));
1484
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<object>").WithArguments("B<T>", "A<object?>", "T", "A<object>").WithLocation(6, 15),
1487
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<object?>").WithArguments("C<T>", "A<object>", "T", "A<object?>").WithLocation(7, 15));
1493
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<object>").WithArguments("B<T>", "A<object?>", "T", "A<object>").WithLocation(6, 15),
1496
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<object?>").WithArguments("C<T>", "A<object>", "T", "A<object?>").WithLocation(7, 15));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (147)
Semantics\NullableReferenceTypesTests.cs (147)
88373
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "new A<IEnumerator<string>?>()").WithArguments("Extensions.GetEnumerator<T>(A<T>)", "System.Collections.Generic.IEnumerator<string>", "T", "System.Collections.Generic.IEnumerator<string>?").WithLocation(7, 26),
88880
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "new A<IAsyncEnumerator<string>?>()").WithArguments("Extensions.GetAsyncEnumerator<T>(A<T>)", "System.Collections.Generic.IAsyncEnumerator<string>", "T", "System.Collections.Generic.IAsyncEnumerator<string>?").WithLocation(7, 32),
89793
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F").WithArguments("C.F<T, U>(T, U)", "C", "U", "C?").WithLocation(8, 9));
97708
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("C<T>", "A", "T", "A?").WithLocation(6, 11),
97711
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "c1").WithArguments("C<T>", "A", "T", "A?").WithLocation(6, 19));
97875
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "C1<A?>").WithArguments("C1<T>", "A", "T", "A?").WithLocation(6, 14),
97908
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "D2").WithArguments("C1<T>", "A", "T", "A?").WithLocation(6, 7),
101350
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "base.M1<object?>").WithArguments("Test1<dynamic>.M1<S>()", "object", "S", "object?").WithLocation(18, 9),
101353
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "this.M1<object?>").WithArguments("Test2.M1<S>()", "object", "S", "object?").WithLocation(19, 9)
101443
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "base.M1<Test1<object?>>").WithArguments("Test1<Test1<dynamic>>.M1<S>()", "Test1<object>", "S", "Test1<object?>").WithLocation(18, 9),
101446
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "this.M1<Test1<object?>>").WithArguments("Test2.M1<S>()", "Test1<object>", "S", "Test1<object?>").WithLocation(19, 9)
101565
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<int?>").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(15, 9),
101568
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(16, 9),
101571
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(19, 9)
101611
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<int?>").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(15, 9),
101614
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(16, 9),
101617
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(19, 9)
101718
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<S?>").WithArguments("A<T>.M<S>(S)", "T", "S", "S?").WithLocation(7, 9),
101721
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<T>.M<S>(S)", "T", "S", "S?").WithLocation(8, 9)
101804
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<int?>").WithArguments("Test2.M1<S>(S)", "System.ValueType", "S", "int?").WithLocation(26, 9),
101810
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<int?>").WithArguments("Test3.M1<S>(S)", "object", "S", "int?").WithLocation(46, 9),
101876
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<int?>").WithArguments("Test22.M1<S>(S)", "System.ValueType", "S", "int?").WithLocation(14, 9),
101882
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<int?>").WithArguments("Test33.M1<S>(S)", "object", "S", "int?").WithLocation(29, 9),
101948
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<notnull?>").WithArguments("A.M<T>()", "notnull", "T", "notnull?").WithLocation(13, 9)
102115
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<T>").WithArguments("A<System.ValueType, int?>.M<V>(V)", "System.ValueType", "V", "T").WithLocation(11, 9));
102385
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<object?>").WithArguments("Test1<object>.M1<S>(S)", "object", "S", "object?").WithLocation(7, 9),
102388
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<object?>").WithArguments("Test22.M1<S>(S)", "object", "S", "object?").WithLocation(21, 9),
102391
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<object?>").WithArguments("Test3.M1<S>(S)", "object", "S", "object?").WithLocation(29, 9),
102394
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<object?>").WithArguments("Test32.M1<S>(S)", "object", "S", "object?").WithLocation(43, 9),
104055
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IB").WithArguments("IA<TA>", "ID<string>", "TA", "ID<string?>").WithLocation(8, 18),
104058
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IC").WithArguments("IA<TA>", "ID<string>", "TA", "ID<string>?").WithLocation(11, 18),
104061
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "ID<string?>").WithArguments("IA<TA>", "ID<string>", "TA", "ID<string?>").WithLocation(24, 12),
104064
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "ID<string>?").WithArguments("IA<TA>", "ID<string>", "TA", "ID<string>?").WithLocation(25, 12),
104067
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string?>").WithLocation(34, 9),
104070
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string>?").WithLocation(36, 9),
104073
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<ID<string?>>").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string?>").WithLocation(37, 9),
104076
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<ID<string?>>").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string?>").WithLocation(38, 9),
104082
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<ID<string>?>").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string>?").WithLocation(39, 9)
104285
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IB").WithArguments("IA<TA>", "ID<string>", "TA", "TIB").WithLocation(8, 18),
104288
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IC").WithArguments("IA<TA>", "ID<string>", "TA", "TIC").WithLocation(11, 18),
104291
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "ID<string>", "TA", "TB1").WithLocation(24, 12),
104294
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB2").WithArguments("IA<TA>", "ID<string>", "TA", "TB2").WithLocation(25, 12),
104297
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(34, 9),
104300
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(36, 9),
104303
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(37, 9),
104306
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB2>").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(38, 9)
104605
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "ID<string>", "TA", "TB1").WithLocation(24, 12),
104608
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB2").WithArguments("IA<TA>", "ID<string>", "TA", "TB2").WithLocation(25, 12),
104611
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(34, 9),
104614
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(36, 9),
104617
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(37, 9),
104620
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB2>").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(38, 9)
104889
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IB").WithArguments("IA<TA>", "ID<string>", "TA", "TIB").WithLocation(8, 18),
104892
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IC").WithArguments("IA<TA>", "ID<string>", "TA", "TIC").WithLocation(11, 18),
104895
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "ID<string>", "TA", "TB1").WithLocation(28, 12),
104898
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB2").WithArguments("IA<TA>", "ID<string>", "TA", "TB2").WithLocation(29, 12),
104901
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(39, 9),
104904
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(41, 9),
104907
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(43, 9),
104910
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB2>").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(44, 9)
105049
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "ID<string>", "TA", "TB1").WithLocation(33, 12),
105052
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB2").WithArguments("IA<TA>", "ID<string>", "TA", "TB2").WithLocation(34, 12),
105055
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(46, 9),
105058
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(48, 9),
105061
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(50, 9),
105064
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB2>").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(51, 9)
105110
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "IB", "TA", "TB1").WithLocation(12, 12),
105113
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "IC", "TA", "TB1").WithLocation(12, 12),
105119
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "IB", "TM1", "TB1").WithLocation(20, 9),
105122
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "IC", "TM1", "TB1").WithLocation(20, 9),
105128
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "IB", "TM1", "TB1").WithLocation(21, 9),
105131
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "IC", "TM1", "TB1").WithLocation(21, 9)
105160
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
105163
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
105192
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
105195
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
105224
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
105227
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
105262
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
105265
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
105300
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
105303
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
105627
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "IB", "TA", "TB1").WithLocation(12, 12),
105630
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "IC", "TA", "TB1").WithLocation(12, 12),
105636
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "IB", "TM1", "TB1").WithLocation(20, 9),
105639
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "IC", "TM1", "TB1").WithLocation(20, 9),
105645
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "IB", "TM1", "TB1").WithLocation(21, 9),
105648
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "IC", "TM1", "TB1").WithLocation(21, 9)
107182
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "B2").WithArguments("I<T, U>", "T", "U", "T?").WithLocation(15, 7),
107840
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A2<object>").WithArguments("B2<T, U>", "A2<object?>", "U", "A2<object>").WithLocation(8, 29));
108140
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "B2").WithArguments("A<T>", "I<B2>", "T", "B2").WithLocation(10, 22),
108143
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "B1?").WithArguments("A<T>", "I<B1?>", "T", "B1?").WithLocation(11, 22)
108238
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "G9").WithArguments("B4<T>", "A", "T", "A?").WithLocation(35, 12),
108318
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "G4").WithArguments("B1<T>", "A<object?>", "T", "A<object>").WithLocation(30, 19),
108321
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "G8").WithArguments("B3<T>", "A<object?>", "T", "A<object>").WithLocation(34, 19),
108324
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "G9").WithArguments("B4<T>", "A<object>", "T", "A<object?>").WithLocation(35, 20)
108374
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "T").WithArguments("A1<T, U>", "T", "U", "T?").WithLocation(5, 10),
108457
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F1<S2>").WithArguments("B.F1<T>()", "I<object?>", "T", "S2").WithLocation(22, 9),
108460
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F2<S1>").WithArguments("B.F2<T>()", "I<object>", "T", "S1").WithLocation(24, 9),
108463
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "FIn1<SIn2>").WithArguments("B.FIn1<T>()", "IIn<object?>", "T", "SIn2").WithLocation(34, 9),
108466
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "FOut2<SOut1>").WithArguments("B.FOut2<T>()", "IOut<object>", "T", "SOut1").WithLocation(48, 9));
108527
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F1<U>").WithArguments("B.F1<T>()", "I<object?>", "T", "U").WithLocation(14, 9),
108530
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F2<T>").WithArguments("B.F2<T>()", "I<object>", "T", "T").WithLocation(15, 9),
108533
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "FIn1<U>").WithArguments("B.FIn1<T>()", "IIn<object?>", "T", "U").WithLocation(23, 9),
108536
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "FOut2<T>").WithArguments("B.FOut2<T>()", "IOut<object>", "T", "T").WithLocation(33, 9));
108575
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F1").WithArguments("C.F1<T>(T)", "A", "T", "A?").WithLocation(11, 9),
108581
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F1").WithArguments("C.F1<T>(T)", "A", "T", "A?").WithLocation(14, 9));
108765
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A").WithArguments("B<T>", "I<A?>", "T", "A").WithLocation(8, 15));
108862
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "string?").WithArguments("A0<T>", "System.IEquatable<string?>", "T", "string?").WithLocation(5, 16),
108865
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "string?").WithArguments("A5<T>", "System.IEquatable<string?>", "T", "string?").WithLocation(9, 16)
108959
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "string?").WithArguments("A2<T>", "System.IEquatable<string?>", "T", "string?").WithLocation(5, 16)
111188
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "T1?").WithArguments("A<T1>.B<T2>", "T1", "T2", "T1?").WithLocation(20, 17),
111191
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "C?").WithArguments("A<C>.B<T2>", "C", "T2", "C?").WithLocation(22, 16)
115363
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(6, 9),
115366
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<T>>").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(7, 9),
115369
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<string?>>").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<string?>").WithLocation(8, 9)
115400
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U, W>(U, W?)", "I1<U?>", "U", "I1<T>").WithLocation(6, 9),
115403
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U, W>(U, W?)", "I1<U?>", "U", "I1<T>").WithLocation(9, 9),
115406
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<T>, U>").WithArguments("Outer.M3<U, W>(U, W?)", "I1<U?>", "U", "I1<T>").WithLocation(11, 9),
115409
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<object>, string>").WithArguments("Outer.M3<U, W>(U, W?)", "I1<string?>", "U", "I1<object>").WithLocation(12, 9)
115437
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<object>, object?>").WithArguments("Outer.M3<U, W>(U, W)", "I1<object?>", "U", "I1<object>").WithLocation(9, 9)
115466
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(7, 9),
115469
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(8, 9),
115472
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<T>>").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(9, 9)
115530
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<object>, string?>").WithArguments("Outer.M3<U, W>(U, W)", "I1<string?>", "U", "I1<object>").WithLocation(12, 9)
119997
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "b1.F").WithArguments("B<object>.F<U>(U)", "A<object>", "U", "A<object?>").WithLocation(13, 9),
120000
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "b2.F").WithArguments("B<object?>.F<U>(U)", "A<object?>", "U", "A<object>").WithLocation(18, 9));
136770
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F<T?>").WithArguments("C<T>.F<U>()", "T", "U", "T?").WithLocation(15, 14),
136773
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F<T?>").WithArguments("C<T>.F<U>()", "T", "U", "T?").WithLocation(19, 23));
136812
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F").WithArguments("C<T>.F<U>(U)", "T", "U", "T?").WithLocation(15, 14),
136815
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F").WithArguments("C<T>.F<U>(U)", "T", "U", "T?").WithLocation(19, 23));
136854
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F<T?>").WithArguments("C<T>.F<U>(U)", "T", "U", "T?").WithLocation(15, 14),
136857
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F<T?>").WithArguments("C<T>.F<U>(U)", "T", "U", "T?").WithLocation(19, 23));
137102
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "x.F").WithArguments("E.F<T, U>(T, U)", "T", "U", "T?").WithLocation(14, 14),
137105
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "x.F").WithArguments("E.F<T, U>(T, U)", "T", "U", "T?").WithLocation(18, 23));
150176
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U?>").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(8, 16),
150179
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U?>").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(9, 16),
150182
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(11, 9),
150185
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U>").WithArguments("A<T>.F<U>(U)", "T", "U", "U").WithLocation(15, 16),
150188
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U>").WithArguments("A<T>.F<U>(U)", "T", "U", "U").WithLocation(16, 16),
150194
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U?>").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(17, 16),
150197
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U?>").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(18, 16),
150200
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F").WithArguments("A<T>.F<U>(U)", "T", "U", "U").WithLocation(19, 16),
150203
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(20, 16));
155509
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "default(string)").WithArguments("C<string>.Add<U>(U)", "string", "U", "string?").WithLocation(7, 21),
155512
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "default(string)").WithArguments("C<string>.Add<U>(U)", "string", "U", "string?").WithLocation(9, 50),
155515
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "default(string)").WithArguments("C<string>.Add<U>(U)", "string", "U", "string?").WithLocation(10, 32)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\DefaultInterfaceImplementationTests.cs (2)
35745
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Test<Test1, Test1>").WithArguments("Test1.Test<i11, i12>()", "I1<string?>", "i11", "Test1").WithLocation(9, 9)
35941
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Test<Test1, Test1>").WithArguments("Test1.Test<i11, i12>()", "I1<string>", "i12", "Test1").WithLocation(9, 9)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
348
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
: