162 references to WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
41
nullableWarnings.Add(GetId(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
));
449
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
:
1919
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
:
Generated\ErrorFacts.Generated.cs (1)
222
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
:
Symbols\ConstraintsHelper.cs (1)
1055
nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, containingSymbol.ConstructedFrom(), typeParameter, typeArgument))));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Attributes\AttributeTests_Nullable.cs (2)
1538
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "object?").WithArguments("C<T, U>", "T", "object?").WithLocation(5, 15),
1541
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "object?").WithArguments("C<T, U>", "T", "object?").WithLocation(6, 15)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (154)
Semantics\NullableReferenceTypesTests.cs (150)
8419
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("C<T>", "T", "string?").WithLocation(18, 25),
8422
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "x").WithArguments("C<T>", "T", "string?").WithLocation(34, 33),
8425
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("C<T>", "T", "string?").WithLocation(35, 35),
8431
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("C<T>", "T", "string?").WithLocation(37, 29),
8434
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "D2").WithArguments("C<T>", "T", "string?").WithLocation(39, 11),
8437
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "+").WithArguments("C<T>", "T", "T?").WithLocation(40, 34),
8440
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "y").WithArguments("C<T>", "T", "T?").WithLocation(40, 50),
8443
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "x").WithArguments("C<T>", "T", "T?").WithLocation(43, 18),
8446
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "x").WithArguments("C<T>", "T", "string?").WithLocation(45, 36)
26869
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, out T)", "T", "T?").WithLocation(34, 13),
26878
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, out T?)", "T", "T?").WithLocation(38, 13),
26893
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, out T)", "T", "T?").WithLocation(48, 13),
26902
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, out T?)", "T", "T?").WithLocation(52, 13),
29752
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, out T)", "T", "T?").WithLocation(34, 13),
29758
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, out T?)", "T", "T?").WithLocation(38, 13),
29767
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, out T)", "T", "T?").WithLocation(48, 13),
29773
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, out T?)", "T", "T?").WithLocation(52, 13),
33256
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "CopyOrDefault").WithArguments("C.CopyOrDefault<T>(T, out T?)", "T", "string?").WithLocation(6, 9),
33332
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "CopyOrDefault").WithArguments("C.CopyOrDefault<T>(T, out T?[])", "T", "string?").WithLocation(6, 9),
34425
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Copy").WithArguments("C.Copy<T>(T, out T?)", "T", "string?").WithLocation(7, 9)
34637
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Copy").WithArguments("C.Copy<T>(T)", "T", "string?").WithLocation(6, 17),
38011
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(20, 9),
38014
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(26, 9));
38264
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F1").WithArguments("A.F1<T>(T)", "T", "object?").WithLocation(7, 9),
38267
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T)", "T", "object?").WithLocation(9, 9));
39100
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F1").WithArguments("A.F1<T>(T, T)", "T", "object?").WithLocation(10, 9),
39103
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F1").WithArguments("A.F1<T>(T, T)", "T", "object?").WithLocation(11, 9),
39106
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F1").WithArguments("A.F1<T>(T, T)", "T", "object?").WithLocation(13, 9),
39109
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T, T)", "T", "object?").WithLocation(15, 9),
39112
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T, T)", "T", "object?").WithLocation(16, 9),
39115
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T, T)", "T", "object?").WithLocation(18, 9),
39118
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T, T)", "T", "object?").WithLocation(20, 9),
39121
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T, T)", "T", "object?").WithLocation(21, 9)
41834
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(21, 16),
41846
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(27, 16),
42023
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(21, 16),
42035
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(27, 16),
43748
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(21, 9),
43754
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T)", "T", "T?").WithLocation(22, 9),
43763
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(27, 9),
43769
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T)", "T", "T?").WithLocation(28, 9),
44138
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F1").WithArguments("A.F1<T>(T)", "T", "object?").WithLocation(7, 9),
44144
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T)", "T", "object?").WithLocation(9, 9),
44394
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, out T)", "T", "T?").WithLocation(29, 9),
44400
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, out T?)", "T", "T?").WithLocation(32, 9),
44409
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, out T)", "T", "T?").WithLocation(40, 9),
44415
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, out T?)", "T", "T?").WithLocation(43, 9),
44702
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F1").WithArguments("A.F1<T>(T, out T)", "T", "object?").WithLocation(7, 9),
44708
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T, out T)", "T", "object?").WithLocation(13, 9),
44960
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, ref T)", "T", "T?").WithLocation(39, 9),
44966
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, ref T?)", "T", "T?").WithLocation(43, 9),
44975
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, ref T)", "T", "T?").WithLocation(53, 9),
44984
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, ref T?)", "T", "T?").WithLocation(57, 9),
45190
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(20, 9),
45193
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T)", "T", "T?").WithLocation(21, 9),
45196
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T)", "T", "T?").WithLocation(26, 9),
45199
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T)", "T", "T?").WithLocation(27, 9)
45356
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F1").WithArguments("A.F1<T>(T)", "T", "object?").WithLocation(7, 9),
45362
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("A.F2<T>(T)", "T", "object?").WithLocation(9, 9)
46124
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, out T)", "T", "T?").WithLocation(29, 9),
46127
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, out T?)", "T", "T?").WithLocation(32, 9),
46130
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F2").WithArguments("Program.F2<T>(T, out T)", "T", "T?").WithLocation(40, 9),
46133
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F3").WithArguments("Program.F3<T>(T, out T?)", "T", "T?").WithLocation(43, 9));
46729
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "t1.E1").WithArguments("Program.E1<T>(T)", "T", "T?").WithLocation(13, 13),
46735
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "t2.E1").WithArguments("Program.E1<T>(T)", "T", "T").WithLocation(19, 13));
61527
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("D<T>", "T", "string?").WithLocation(6, 21),
61542
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("D<T>", "T", "string?").WithLocation(10, 21),
74540
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<string?>").WithArguments("C.M1<T>(T?)", "T", "string?").WithLocation(25, 9),
74549
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<CL0<string?>?>").WithArguments("C.M1<T>(T?)", "T", "CL0<string?>?").WithLocation(35, 9),
80880
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F").WithArguments("C.F<T>((T, T?))", "T", "string?").WithLocation(8, 9),
80886
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F").WithArguments("C.F<T>((T, T?))", "T", "string?").WithLocation(9, 9),
80911
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F").WithArguments("C.F<T>((T, T?))", "T", "string?").WithLocation(8, 9),
80917
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F").WithArguments("C.F<T>((T, T?))", "T", "string?").WithLocation(9, 9),
86226
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "x1").WithArguments("A1<T>", "T", "T?").WithLocation(12, 27),
86235
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "x2").WithArguments("A2<T>", "T", "T?").WithLocation(21, 27),
86505
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "c").WithArguments("C<T>", "T", "T?").WithLocation(10, 28),
86568
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "T?").WithArguments("S<T>", "T", "T?").WithLocation(25, 34),
86577
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "T?").WithArguments("S<T>", "T", "T?").WithLocation(27, 32),
86583
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "T?").WithArguments("S<T>", "T", "T?").WithLocation(29, 33),
86589
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "T?").WithArguments("S<T>", "T", "T?").WithLocation(31, 38),
88074
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "new A<string?>()").WithArguments("Extensions.GetEnumerator<T>(A<T>)", "T", "string?").WithLocation(12, 26),
88575
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "new A<string?>()").WithArguments("Extensions.GetAsyncEnumerator<T>(A<T>)", "T", "string?").WithLocation(12, 32),
89754
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F").WithArguments("C.F<T>(T, T?)", "T", "C?").WithLocation(6, 9),
89760
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F").WithArguments("C.F<T>(T, T?)", "T", "C?").WithLocation(7, 9),
90377
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F").WithArguments("C.F<T>(IOut<T>, IOut<T?>)", "T", "string?").WithLocation(36, 9),
90383
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F").WithArguments("C.F<T>(IOut<T>, IOut<T?>)", "T", "string?").WithLocation(37, 9),
97809
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Property").WithArguments("C<T>", "T", "object?").WithLocation(6, 16),
97812
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Method").WithArguments("C<T>", "T", "object?").WithLocation(7, 16),
97815
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "p").WithArguments("C<T>", "T", "object?").WithLocation(7, 34),
97818
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Field").WithArguments("C<T>", "T", "object?").WithLocation(11, 23),
97821
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "object?").WithArguments("C<T>", "T", "object?").WithLocation(11, 37),
97824
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Property").WithArguments("C<T>", "T", "object?").WithLocation(12, 16),
97827
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Method").WithArguments("C<T>", "T", "object?").WithLocation(13, 16),
97830
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "p").WithArguments("C<T>", "T", "object?").WithLocation(13, 34),
97833
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Property").WithArguments("C<T>", "T", "object?").WithLocation(15, 18),
97836
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Method").WithArguments("C<T>", "T", "object?").WithLocation(16, 18),
97839
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "p").WithArguments("C<T>", "T", "object?").WithLocation(16, 36),
97842
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "object?").WithArguments("C<T>", "T", "object?").WithLocation(19, 12),
97845
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "object?").WithArguments("C<T>", "T", "object?").WithLocation(19, 25));
97878
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "C3<A?>").WithArguments("C3<T>", "T", "A?").WithLocation(10, 14));
97911
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "D6").WithArguments("C3<T>", "T", "A?").WithLocation(10, 7));
104129
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "IB").WithArguments("IA<TA>", "TA", "string?").WithLocation(8, 18),
104132
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("IA<TA>", "TA", "string?").WithLocation(18, 12),
104135
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(27, 9),
104138
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<string?>").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(29, 9),
104141
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<string?>").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(30, 9)
104354
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "IB").WithArguments("IA<TA>", "TA", "TIB").WithLocation(8, 18),
104357
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "TB1").WithArguments("IA<TA>", "TA", "TB1").WithLocation(21, 12),
104360
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(30, 9),
104363
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(32, 9)
104669
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "TB1").WithArguments("IA<TA>", "TA", "TB1").WithLocation(21, 12),
104672
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(30, 9),
104675
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(32, 9)
104720
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "IB").WithArguments("IA<TA>", "TA", "TIB").WithLocation(8, 18),
104723
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "TB1").WithArguments("IA<TA>", "TA", "TB1").WithLocation(18, 12),
104726
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(27, 9),
104729
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(29, 9)
104816
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "TB1").WithArguments("IA<TA>", "TA", "TB1").WithLocation(18, 12),
104819
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(27, 9),
104822
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(29, 9)
105107
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "TB1").WithArguments("IA<TA>", "TA", "TB1").WithLocation(12, 12),
105116
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(20, 9),
105125
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(21, 9),
107185
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "B3").WithArguments("A<T, U>", "T", "T?").WithLocation(19, 7),
107188
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "B3").WithArguments("I<T, U>", "T", "T?").WithLocation(19, 7),
107191
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "B4").WithArguments("A<T, U>", "T", "T?").WithLocation(23, 7),
107194
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "B4").WithArguments("I<T, U>", "T", "T?").WithLocation(23, 7));
107286
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "object?").WithArguments("C<T, U>", "T", "object?").WithLocation(6, 19),
107289
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "object?").WithArguments("C<T, U>", "T", "object?").WithLocation(7, 19)
107349
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "U").WithArguments("I<T>", "T", "T?").WithLocation(10, 20),
107355
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "U").WithArguments("I<T>", "T", "T?").WithLocation(11, 20),
107947
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "B4").WithArguments("A<T>", "T", "string?").WithLocation(27, 7)
107958
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "B4").WithArguments("A<T>", "T", "string?").WithLocation(27, 7)
108371
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "T").WithArguments("A1<T, U>", "U", "T?").WithLocation(5, 10),
108377
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "T").WithArguments("A2<T, U>", "T", "T?").WithLocation(7, 10));
108956
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("A2<T>", "T", "string?").WithLocation(5, 16),
114410
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1").WithArguments("Outer.M1<T>(T)", "T", "T").WithLocation(6, 9),
114413
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<T>").WithArguments("Outer.M1<T>(T)", "T", "T").WithLocation(7, 9)
114438
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1").WithArguments("Outer.M1<T>(T)", "T", "T").WithLocation(7, 9),
114441
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "M1<T>").WithArguments("Outer.M1<T>(T)", "T", "T").WithLocation(8, 9)
130427
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "p").WithArguments("E.Deconstruct<T, U>(Pair<T, U>, out T, out U)", "T", "object?").WithLocation(14, 22),
130472
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "p").WithArguments("E.Deconstruct<T, U>(Pair<T, U>, out T, out U)", "T", "object?").WithLocation(21, 27),
130475
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "p").WithArguments("E.Deconstruct<T, U>(Pair2<T, U>, out T, out U)", "U", "object?").WithLocation(21, 27),
134571
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "F<U>").WithArguments("C.F<T>(I<T>)", "T", "U").WithLocation(16, 9),
137190
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "y.F").WithArguments("E.F<T>(T)", "T", "T?").WithLocation(14, 13),
137193
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "y.F").WithArguments("E.F<T>(T)", "T", "T?").WithLocation(16, 23));
140638
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "Interlocked.CompareExchange").WithArguments("System.Threading.Interlocked.CompareExchange<T>(ref T, T, T)", "T", "object?").WithLocation(15, 9));
153469
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "FieldItem").WithArguments("C.AuditedItem<T>", "T", "object?").WithLocation(13, 19),
153472
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "FieldItem").WithArguments("C.AuditedItem<T>", "T", "object?").WithLocation(13, 19),
153475
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "FieldItem").WithArguments("C.AuditedItem<T>", "T", "object?").WithLocation(13, 19)
Semantics\RecordStructTests.cs (2)
2932
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("R<T>", "T", "string?").WithLocation(3, 15),
2935
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("R2<T>", "T", "string?").WithLocation(4, 17)
Semantics\RecordTests.cs (2)
25626
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("R<T>", "T", "string?").WithLocation(10, 23),
25629
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
, "string?").WithArguments("R2<T>", "T", "string?").WithLocation(11, 25)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
352
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint
: