82 references to WRN_NullabilityMismatchInTypeParameterNotNullConstraint
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (3)
42
nullableWarnings.Add(GetId(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
));
462
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
:
1963
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
:
Generated\ErrorFacts.Generated.cs (1)
231
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
:
Symbols\ConstraintsHelper.cs (1)
1048
nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, containingSymbol.ConstructedFrom(), typeParameter, typeArgument))));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (76)
Semantics\NullableReferenceTypesTests.cs (76)
39842
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M0").WithArguments("Program.M0<T>(T)", "T", "string?").WithLocation(8, 9),
39891
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M0").WithArguments("Program.M0<T>(params T[]?)", "T", "string?").WithLocation(8, 9),
88109
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "new A<string?>()").WithArguments("Extensions.GetEnumerator<T>(A<T>)", "T", "string?").WithLocation(12, 26),
88611
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "new A<string?>()").WithArguments("Extensions.GetAsyncEnumerator<T>(A<T>)", "T", "string?").WithLocation(12, 32),
97742
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "Property").WithArguments("C<T>", "T", "object?").WithLocation(6, 16),
97745
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "Method").WithArguments("C<T>", "T", "object?").WithLocation(7, 16),
97748
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "p").WithArguments("C<T>", "T", "object?").WithLocation(7, 34),
97751
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "Field").WithArguments("C<T>", "T", "object?").WithLocation(11, 23),
97754
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "object?").WithArguments("C<T>", "T", "object?").WithLocation(11, 37),
97757
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "Property").WithArguments("C<T>", "T", "object?").WithLocation(12, 16),
97760
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "Method").WithArguments("C<T>", "T", "object?").WithLocation(13, 16),
97763
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "p").WithArguments("C<T>", "T", "object?").WithLocation(13, 34),
97766
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "Property").WithArguments("C<T>", "T", "object?").WithLocation(15, 18),
97769
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "Method").WithArguments("C<T>", "T", "object?").WithLocation(16, 18),
97772
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "p").WithArguments("C<T>", "T", "object?").WithLocation(16, 36),
97775
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "object?").WithArguments("C<T>", "T", "object?").WithLocation(19, 12),
97778
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "object?").WithArguments("C<T>", "T", "object?").WithLocation(19, 25));
97931
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "p").WithArguments("(T1, T2)", "T2", "string?").WithLocation(4, 31),
97934
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "p").WithArguments("(T1, T2)", "T2", "string?").WithLocation(6, 34));
97959
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "p").WithArguments("(T1, T2)", "T2", "string?").WithLocation(5, 26),
97962
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "p").WithArguments("(T1, T2)", "T2", "string?").WithLocation(6, 29),
97965
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "p").WithArguments("C<T>", "T", "string?").WithLocation(7, 19));
97988
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "c").WithArguments("C<T>", "T", "string?").WithLocation(9, 51),
97991
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "C<string?>").WithArguments("C<T>", "T", "string?").WithLocation(10, 37),
97994
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("C<T>", "T", "string?").WithLocation(10, 64));
98021
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "s2").WithArguments("(T1, T2)", "T2", "string?").WithLocation(9, 23),
98024
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "s2").WithArguments("(T1, T2)", "T1", "string?").WithLocation(10, 19),
98027
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "s2").WithArguments("(T1, T2)", "T1", "string?").WithLocation(11, 19),
98030
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "s2").WithArguments("(T1, T2)", "T2", "string?").WithLocation(11, 23),
98033
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "(string)null").WithArguments("(T1, T2)", "T1", "string?").WithLocation(12, 19),
98036
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "(string)null").WithArguments("System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>", "T1", "string?").WithLocation(13, 19),
98039
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "(string)null").WithArguments("(T1, T2)", "T1", "string?").WithLocation(13, 57),
98042
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "(string)null").WithArguments("(T1, T2)", "T2", "string?").WithLocation(13, 71)
98067
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("(T1, T2)", "T1", "string?").WithLocation(7, 10),
98070
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>", "T1", "string?").WithLocation(8, 10),
98073
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("(T1, T2)", "T2", "string?").WithLocation(8, 75),
98076
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("(T1, T2)", "T1", "string?").WithLocation(9, 27),
98079
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>", "T1", "string?").WithLocation(10, 27),
98082
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("(T1, T2)", "T2", "string?").WithLocation(10, 92)
101525
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M<int?>").WithArguments("A.M<T>(T)", "T", "int?").WithLocation(7, 9),
101528
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M").WithArguments("A.M<T>(T)", "T", "int?").WithLocation(8, 9),
101531
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M").WithArguments("A.M<T>(T)", "T", "int?").WithLocation(11, 9)
101688
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "B").WithArguments("A<T>", "T", "System.ValueType?").WithLocation(11, 14)
105349
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "IB").WithArguments("IA<TA>", "TA", "string?").WithLocation(8, 18),
105352
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("IA<TA>", "TA", "string?").WithLocation(18, 12),
105355
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(27, 9),
105358
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<string?>").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(29, 9),
105361
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<string?>").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(30, 9)
105407
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "IB").WithArguments("IA<TA>", "TA", "string?").WithLocation(8, 18),
105410
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "string?").WithArguments("IA<TA>", "TA", "string?").WithLocation(18, 12),
105413
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(27, 9),
105416
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<string?>").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(29, 9),
105419
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<string?>").WithArguments("B.M1<TM1>(TM1)", "TM1", "string?").WithLocation(30, 9)
105469
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "TB1").WithArguments("IA<TA>", "TA", "TB1").WithLocation(21, 12),
105472
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(30, 9),
105475
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<TB1>").WithArguments("B<TB1, TB2>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(32, 9)
105529
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "IB").WithArguments("IA<TA>", "TA", "TIB").WithLocation(4, 18),
105532
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "TB1").WithArguments("IA<TA>", "TA", "TB1").WithLocation(14, 12),
105535
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1").WithArguments("A.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(20, 9),
105538
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<TB1>").WithArguments("A.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(22, 9)
105624
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "TB1").WithArguments("IA<TA>", "TA", "TB1").WithLocation(12, 12),
105633
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1").WithArguments("B<TB1>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(20, 9),
105642
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<TB1>").WithArguments("B<TB1>.M1<TM1>(TM1)", "TM1", "TB1").WithLocation(21, 9),
113218
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M2").WithArguments("Outer.M2<U>(U)", "U", "T").WithLocation(7, 9),
113221
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M2<T>").WithArguments("Outer.M2<U>(U)", "U", "T").WithLocation(8, 9),
113224
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M2").WithArguments("Outer.M2<U>(U)", "U", "T").WithLocation(10, 9),
113230
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M2<T>").WithArguments("Outer.M2<U>(U)", "U", "T").WithLocation(11, 9),
114355
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1").WithArguments("Outer.M1<T>(T)", "T", "T").WithLocation(6, 9),
114358
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<T>").WithArguments("Outer.M1<T>(T)", "T", "T").WithLocation(7, 9)
114383
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1").WithArguments("Outer.M1<T>(T)", "T", "T").WithLocation(7, 9),
114386
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M1<T>").WithArguments("Outer.M1<T>(T)", "T", "T").WithLocation(8, 9)
115257
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M2").WithArguments("Outer.M2<U>(ref U, ref U)", "U", "T").WithLocation(8, 9),
115260
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M2<T>").WithArguments("Outer.M2<U>(ref U, ref U)", "U", "T").WithLocation(9, 9)
115289
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M2").WithArguments("Outer.M2<U>(U)", "U", "T").WithLocation(7, 9),
115292
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "M2<T>").WithArguments("Outer.M2<U>(U)", "U", "T").WithLocation(8, 9)
129949
Diagnostic(ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
, "MakeList").WithArguments("Program.MakeList<T>(T)", "T", "object?").WithLocation(14, 31),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
360
case ErrorCode.
WRN_NullabilityMismatchInTypeParameterNotNullConstraint
: