164 references to WRN_NullabilityMismatchInTypeParameterConstraint
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
40
nullableWarnings.Add(GetId(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
));
457
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
:
1972
or ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
Generated\ErrorFacts.Generated.cs (1)
218
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
:
Symbols\ConstraintsHelper.cs (1)
1184
nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, containingSymbol.ConstructedFrom(), constraintType, typeParameter, typeArgument))));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (9)
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));
Semantics\ExtensionTests.cs (1)
46316
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "iNull.M").WithArguments("E.extension<T>(T)", "I", "T", "I?").WithLocation(4, 1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (147)
Semantics\NullableReferenceTypesTests.cs (147)
92122
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),
92629
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),
93585
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F").WithArguments("C.F<T, U>(T, U)", "C", "U", "C?").WithLocation(8, 9));
101500
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("C<T>", "A", "T", "A?").WithLocation(6, 11),
101503
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "c1").WithArguments("C<T>", "A", "T", "A?").WithLocation(6, 19));
101667
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "C1<A?>").WithArguments("C1<T>", "A", "T", "A?").WithLocation(6, 14),
101700
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "D2").WithArguments("C1<T>", "A", "T", "A?").WithLocation(6, 7),
105142
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "base.M1<object?>").WithArguments("Test1<dynamic>.M1<S>()", "object", "S", "object?").WithLocation(18, 9),
105145
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "this.M1<object?>").WithArguments("Test2.M1<S>()", "object", "S", "object?").WithLocation(19, 9)
105235
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "base.M1<Test1<object?>>").WithArguments("Test1<Test1<dynamic>>.M1<S>()", "Test1<object>", "S", "Test1<object?>").WithLocation(18, 9),
105238
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "this.M1<Test1<object?>>").WithArguments("Test2.M1<S>()", "Test1<object>", "S", "Test1<object?>").WithLocation(19, 9)
105357
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<int?>").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(15, 9),
105360
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(16, 9),
105363
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(19, 9)
105403
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<int?>").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(15, 9),
105406
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(16, 9),
105409
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<System.ValueType>.M<S>(S)", "System.ValueType", "S", "int?").WithLocation(19, 9)
105510
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<S?>").WithArguments("A<T>.M<S>(S)", "T", "S", "S?").WithLocation(7, 9),
105513
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M").WithArguments("A<T>.M<S>(S)", "T", "S", "S?").WithLocation(8, 9)
105596
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<int?>").WithArguments("Test2.M1<S>(S)", "System.ValueType", "S", "int?").WithLocation(26, 9),
105602
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<int?>").WithArguments("Test3.M1<S>(S)", "object", "S", "int?").WithLocation(46, 9),
105668
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<int?>").WithArguments("Test22.M1<S>(S)", "System.ValueType", "S", "int?").WithLocation(14, 9),
105674
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<int?>").WithArguments("Test33.M1<S>(S)", "object", "S", "int?").WithLocation(29, 9),
105740
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<notnull?>").WithArguments("A.M<T>()", "notnull", "T", "notnull?").WithLocation(13, 9)
105907
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M<T>").WithArguments("A<System.ValueType, int?>.M<V>(V)", "System.ValueType", "V", "T").WithLocation(11, 9));
106177
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<object?>").WithArguments("Test1<object>.M1<S>(S)", "object", "S", "object?").WithLocation(7, 9),
106180
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<object?>").WithArguments("Test22.M1<S>(S)", "object", "S", "object?").WithLocation(21, 9),
106183
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<object?>").WithArguments("Test3.M1<S>(S)", "object", "S", "object?").WithLocation(29, 9),
106186
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<object?>").WithArguments("Test32.M1<S>(S)", "object", "S", "object?").WithLocation(43, 9),
107847
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IB").WithArguments("IA<TA>", "ID<string>", "TA", "ID<string?>").WithLocation(8, 18),
107850
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IC").WithArguments("IA<TA>", "ID<string>", "TA", "ID<string>?").WithLocation(11, 18),
107853
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "ID<string?>").WithArguments("IA<TA>", "ID<string>", "TA", "ID<string?>").WithLocation(24, 12),
107856
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "ID<string>?").WithArguments("IA<TA>", "ID<string>", "TA", "ID<string>?").WithLocation(25, 12),
107859
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string?>").WithLocation(34, 9),
107862
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string>?").WithLocation(36, 9),
107865
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<ID<string?>>").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string?>").WithLocation(37, 9),
107868
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<ID<string?>>").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string?>").WithLocation(38, 9),
107874
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<ID<string>?>").WithArguments("B.M1<TM1>(TM1)", "ID<string>", "TM1", "ID<string>?").WithLocation(39, 9)
108077
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IB").WithArguments("IA<TA>", "ID<string>", "TA", "TIB").WithLocation(8, 18),
108080
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IC").WithArguments("IA<TA>", "ID<string>", "TA", "TIC").WithLocation(11, 18),
108083
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "ID<string>", "TA", "TB1").WithLocation(24, 12),
108086
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB2").WithArguments("IA<TA>", "ID<string>", "TA", "TB2").WithLocation(25, 12),
108089
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(34, 9),
108092
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(36, 9),
108095
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(37, 9),
108098
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB2>").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(38, 9)
108397
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "ID<string>", "TA", "TB1").WithLocation(24, 12),
108400
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB2").WithArguments("IA<TA>", "ID<string>", "TA", "TB2").WithLocation(25, 12),
108403
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(34, 9),
108406
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(36, 9),
108409
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(37, 9),
108412
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB2>").WithArguments("B<TB1, TB2, TB3>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(38, 9)
108681
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IB").WithArguments("IA<TA>", "ID<string>", "TA", "TIB").WithLocation(8, 18),
108684
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "IC").WithArguments("IA<TA>", "ID<string>", "TA", "TIC").WithLocation(11, 18),
108687
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "ID<string>", "TA", "TB1").WithLocation(28, 12),
108690
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB2").WithArguments("IA<TA>", "ID<string>", "TA", "TB2").WithLocation(29, 12),
108693
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(39, 9),
108696
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(41, 9),
108699
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(43, 9),
108702
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB2>").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(44, 9)
108841
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "ID<string>", "TA", "TB1").WithLocation(33, 12),
108844
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB2").WithArguments("IA<TA>", "ID<string>", "TA", "TB2").WithLocation(34, 12),
108847
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(46, 9),
108850
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(48, 9),
108853
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB1").WithLocation(50, 9),
108856
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB2>").WithArguments("B<TB1, TB2, TB3, TB4>.M1<TM1>(TM1)", "ID<string>", "TM1", "TB2").WithLocation(51, 9)
108902
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "IB", "TA", "TB1").WithLocation(12, 12),
108905
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "IC", "TA", "TB1").WithLocation(12, 12),
108911
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "IB", "TM1", "TB1").WithLocation(20, 9),
108914
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "IC", "TM1", "TB1").WithLocation(20, 9),
108920
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "IB", "TM1", "TB1").WithLocation(21, 9),
108923
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "IC", "TM1", "TB1").WithLocation(21, 9)
108952
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
108955
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
108984
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
108987
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
109016
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
109019
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
109054
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
109057
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
109092
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(9, 9),
109095
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1, TB1?>").WithArguments("B<TB1>.M1<TM1, TM2>(TM1, TM2)", "TB1", "TM2", "TB1?").WithLocation(10, 9)
109419
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "IB", "TA", "TB1").WithLocation(12, 12),
109422
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "TB1").WithArguments("IA<TA>", "IC", "TA", "TB1").WithLocation(12, 12),
109428
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "IB", "TM1", "TB1").WithLocation(20, 9),
109431
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "IC", "TM1", "TB1").WithLocation(20, 9),
109437
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "IB", "TM1", "TB1").WithLocation(21, 9),
109440
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "IC", "TM1", "TB1").WithLocation(21, 9)
110974
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "B2").WithArguments("I<T, U>", "T", "U", "T?").WithLocation(15, 7),
111632
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A2<object>").WithArguments("B2<T, U>", "A2<object?>", "U", "A2<object>").WithLocation(8, 29));
111932
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "B2").WithArguments("A<T>", "I<B2>", "T", "B2").WithLocation(10, 22),
111935
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "B1?").WithArguments("A<T>", "I<B1?>", "T", "B1?").WithLocation(11, 22)
112030
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "G9").WithArguments("B4<T>", "A", "T", "A?").WithLocation(35, 12),
112110
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "G4").WithArguments("B1<T>", "A<object?>", "T", "A<object>").WithLocation(30, 19),
112113
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "G8").WithArguments("B3<T>", "A<object?>", "T", "A<object>").WithLocation(34, 19),
112116
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "G9").WithArguments("B4<T>", "A<object>", "T", "A<object?>").WithLocation(35, 20)
112166
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "T").WithArguments("A1<T, U>", "T", "U", "T?").WithLocation(5, 10),
112249
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F1<S2>").WithArguments("B.F1<T>()", "I<object?>", "T", "S2").WithLocation(22, 9),
112252
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F2<S1>").WithArguments("B.F2<T>()", "I<object>", "T", "S1").WithLocation(24, 9),
112255
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "FIn1<SIn2>").WithArguments("B.FIn1<T>()", "IIn<object?>", "T", "SIn2").WithLocation(34, 9),
112258
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "FOut2<SOut1>").WithArguments("B.FOut2<T>()", "IOut<object>", "T", "SOut1").WithLocation(48, 9));
112319
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F1<U>").WithArguments("B.F1<T>()", "I<object?>", "T", "U").WithLocation(14, 9),
112322
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F2<T>").WithArguments("B.F2<T>()", "I<object>", "T", "T").WithLocation(15, 9),
112325
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "FIn1<U>").WithArguments("B.FIn1<T>()", "IIn<object?>", "T", "U").WithLocation(23, 9),
112328
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "FOut2<T>").WithArguments("B.FOut2<T>()", "IOut<object>", "T", "T").WithLocation(33, 9));
112367
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F1").WithArguments("C.F1<T>(T)", "A", "T", "A?").WithLocation(11, 9),
112373
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "F1").WithArguments("C.F1<T>(T)", "A", "T", "A?").WithLocation(14, 9));
112557
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A").WithArguments("B<T>", "I<A?>", "T", "A").WithLocation(8, 15));
112654
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "string?").WithArguments("A0<T>", "System.IEquatable<string?>", "T", "string?").WithLocation(5, 16),
112657
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "string?").WithArguments("A5<T>", "System.IEquatable<string?>", "T", "string?").WithLocation(9, 16)
112751
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "string?").WithArguments("A2<T>", "System.IEquatable<string?>", "T", "string?").WithLocation(5, 16)
114980
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "T1?").WithArguments("A<T1>.B<T2>", "T1", "T2", "T1?").WithLocation(20, 17),
114983
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "C?").WithArguments("A<C>.B<T2>", "C", "T2", "C?").WithLocation(22, 16)
119155
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(6, 9),
119158
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<T>>").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(7, 9),
119161
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<string?>>").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<string?>").WithLocation(8, 9)
119192
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U, W>(U, W?)", "I1<U?>", "U", "I1<T>").WithLocation(6, 9),
119195
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U, W>(U, W?)", "I1<U?>", "U", "I1<T>").WithLocation(9, 9),
119198
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<T>, U>").WithArguments("Outer.M3<U, W>(U, W?)", "I1<U?>", "U", "I1<T>").WithLocation(11, 9),
119201
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<object>, string>").WithArguments("Outer.M3<U, W>(U, W?)", "I1<string?>", "U", "I1<object>").WithLocation(12, 9)
119229
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<object>, object?>").WithArguments("Outer.M3<U, W>(U, W)", "I1<object?>", "U", "I1<object>").WithLocation(9, 9)
119258
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(7, 9),
119261
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(8, 9),
119264
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<T>>").WithArguments("Outer.M3<U>(U)", "I1<object>", "U", "I1<T>").WithLocation(9, 9)
119322
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "M3<I1<object>, string?>").WithArguments("Outer.M3<U, W>(U, W)", "I1<string?>", "U", "I1<object>").WithLocation(12, 9)
123789
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "b1.F").WithArguments("B<object>.F<U>(U)", "A<object>", "U", "A<object?>").WithLocation(13, 9),
123792
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "b2.F").WithArguments("B<object?>.F<U>(U)", "A<object?>", "U", "A<object>").WithLocation(18, 9));
141118
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F<T?>").WithArguments("C<T>.F<U>()", "T", "U", "T?").WithLocation(15, 14),
141121
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F<T?>").WithArguments("C<T>.F<U>()", "T", "U", "T?").WithLocation(19, 23));
141160
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F").WithArguments("C<T>.F<U>(U)", "T", "U", "T?").WithLocation(15, 14),
141163
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F").WithArguments("C<T>.F<U>(U)", "T", "U", "T?").WithLocation(19, 23));
141202
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F<T?>").WithArguments("C<T>.F<U>(U)", "T", "U", "T?").WithLocation(15, 14),
141205
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Create(x).F<T?>").WithArguments("C<T>.F<U>(U)", "T", "U", "T?").WithLocation(19, 23));
141450
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "x.F").WithArguments("E.F<T, U>(T, U)", "T", "U", "T?").WithLocation(14, 14),
141453
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "x.F").WithArguments("E.F<T, U>(T, U)", "T", "U", "T?").WithLocation(18, 23));
154659
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U?>").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(8, 16),
154662
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U?>").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(9, 16),
154665
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(11, 9),
154668
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U>").WithArguments("A<T>.F<U>(U)", "T", "U", "U").WithLocation(15, 16),
154671
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U>").WithArguments("A<T>.F<U>(U)", "T", "U", "U").WithLocation(16, 16),
154677
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U?>").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(17, 16),
154680
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F<U?>").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(18, 16),
154683
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F").WithArguments("A<T>.F<U>(U)", "T", "U", "U").WithLocation(19, 16),
154686
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "A<T>.F").WithArguments("A<T>.F<U>(U)", "T", "U", "U?").WithLocation(20, 16));
160038
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "default(string)").WithArguments("C<string>.Add<U>(U)", "string", "U", "string?").WithLocation(7, 21),
160041
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "default(string)").WithArguments("C<string>.Add<U>(U)", "string", "U", "string?").WithLocation(9, 50),
160044
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)
35941
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
, "Test<Test1, Test1>").WithArguments("Test1.Test<i11, i12>()", "I1<string?>", "i11", "Test1").WithLocation(9, 9)
36137
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)
370
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterConstraint
: