133 references to ERR_GenericConstraintNotSatisfiedRefType
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
855
or ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
Symbols\ConstraintsHelper.cs (1)
1193
errorCode = ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenAsyncTests.cs (1)
4079
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "{ await (Task)null; }").WithArguments("MyTaskBuilder.Start<TSM>(ref TSM)", "I", "TSM", "C.<f>d__1").WithLocation(8, 22));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\UnmanagedTypeModifierTests.cs (3)
1215
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<string>").WithArguments("TestRef.M<T>()", "System.ValueType", "T", "string").WithLocation(7, 23),
1271
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<string>").WithArguments("TestRef.M<T>()", "System.ValueType", "T", "string").WithLocation(7, 23),
1329
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<string>").WithArguments("TestRef.M<T>()", "System.ValueType", "T", "string").WithLocation(7, 23),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
FirstClassSpanTests.cs (1)
1870
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "source()").WithArguments("System.ReadOnlySpan<object>.CastUp<TDerived>(System.ReadOnlySpan<TDerived>)", "C", "TDerived", "string").WithLocation(2, 26));
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
573
diagnosticsBuilder.Add(Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "T").WithArguments($"C{i}<T>", $"C{next}<T>", "T", "T"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (58)
Semantics\BetterCandidates.cs (2)
690
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M").WithArguments("Program.M<T>(T, int)", "B", "T", "A").WithLocation(5, 9)
890
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M").WithArguments("Program.M<T>(T, int)", "B", "T", "A").WithLocation(5, 9)
Semantics\BindingAsyncTasklikeMoreTests.cs (4)
1009
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "await F();").WithArguments("MyTaskMethodBuilder<int>.AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter, ref TStateMachine)", "System.Runtime.CompilerServices.IAsyncStateMachine", "TAwaiter", "MyTask.Awaiter").WithLocation(17, 9),
1012
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "await G(3)").WithArguments("MyTaskMethodBuilder<int>.AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter, ref TStateMachine)", "System.Runtime.CompilerServices.IAsyncStateMachine", "TAwaiter", "MyTask<int>.Awaiter").WithLocation(18, 16)
1094
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "await Task.Delay(0);").WithArguments("MyTaskMethodBuilder<T>.AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter, ref TStateMachine)", "System.Runtime.CompilerServices.ICriticalNotifyCompletion", "TStateMachine", "C.<G>d__1<T>").WithLocation(14, 40));
1497
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "await new MyTask();").WithArguments("MyTaskMethodBuilder.AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter, ref TStateMachine)", "IMyAwaiter", "TAwaiter", "MyTask.Awaiter").WithLocation(5, 9));
Semantics\DelegateTypeTests.cs (1)
4552
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "F").WithArguments("Program.F<T>(T)", "System.Linq.Expressions.Expression", "T", "System.Linq.Expressions.Expression<System.Func<int>>").WithLocation(6, 17));
Semantics\DynamicTests.cs (2)
2116
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "CConstraint<dynamic>").WithArguments("C.CConstraint<T>()", "C", "T", "dynamic"),
2118
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "InterfaceConstraint<dynamic>").WithArguments("C.InterfaceConstraint<T>()", "I", "T", "dynamic"),
Semantics\GenericConstraintsTests.cs (31)
48
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Enum", "T", "string").WithLocation(15, 26));
81
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Enum", "T", "string").WithLocation(15, 26));
178
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Enum", "T", "string").WithLocation(15, 26),
220
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Enum", "T", "string").WithLocation(13, 26));
259
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Enum", "T", "string").WithLocation(13, 26));
334
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Enum", "T", "string").WithLocation(13, 26),
376
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "Legacy").WithArguments("Test<T>", "System.Enum", "T", "Legacy").WithLocation(10, 26));
441
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "System.Enum").WithArguments("Test<T, U>", "E", "U", "System.Enum").WithLocation(18, 29));
711
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M").WithArguments("Test.M<T>(T)", "System.Enum", "T", "Child").WithLocation(20, 9));
737
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Delegate", "T", "string").WithLocation(12, 26));
763
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Delegate", "T", "string").WithLocation(12, 26));
805
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Delegate", "T", "string").WithLocation(12, 26),
836
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Delegate", "T", "string").WithLocation(9, 26));
864
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Delegate", "T", "string").WithLocation(9, 26));
895
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.Delegate", "T", "string").WithLocation(9, 26),
932
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "Legacy").WithArguments("Test<T>", "System.Delegate", "T", "Legacy").WithLocation(9, 26));
961
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "D1").WithArguments("Test<T, U>", "Test2", "U", "D1").WithLocation(10, 33),
964
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "System.Delegate").WithArguments("Test<T, U>", "System.MulticastDelegate", "U", "System.Delegate").WithLocation(14, 52),
967
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "System.Delegate").WithArguments("Test<T, U>", "D1", "U", "System.Delegate").WithLocation(18, 30));
1218
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.MulticastDelegate", "T", "string").WithLocation(12, 26));
1244
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.MulticastDelegate", "T", "string").WithLocation(12, 26));
1286
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.MulticastDelegate", "T", "string").WithLocation(12, 26),
1317
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.MulticastDelegate", "T", "string").WithLocation(9, 26));
1345
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.MulticastDelegate", "T", "string").WithLocation(9, 26));
1376
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("Test<T>", "System.MulticastDelegate", "T", "string").WithLocation(9, 26),
1414
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "Legacy").WithArguments("Test<T>", "System.MulticastDelegate", "T", "Legacy").WithLocation(9, 26));
1443
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "D1").WithArguments("Test<T, U>", "Test2", "U", "D1").WithLocation(10, 33),
1446
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "System.Delegate").WithArguments("Test<T, U>", "System.MulticastDelegate", "U", "System.Delegate").WithLocation(15, 52),
1449
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "System.Delegate").WithArguments("Test<T, U>", "System.MulticastDelegate", "U", "System.Delegate").WithLocation(16, 43),
1452
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "System.MulticastDelegate").WithArguments("Test<T, U>", "D1", "U", "System.MulticastDelegate").WithLocation(18, 30));
1696
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "B").WithArguments("A<T>", "System.MulticastDelegate", "T", "T").WithLocation(3, 7));
Semantics\InterpolationTests.cs (1)
5206
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M").WithArguments("C.M<T>(T)", "CustomHandler", "T", "string").WithLocation(2, 3)
Semantics\LocalFunctionTests.cs (3)
1563
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "Local<object, object>").WithArguments("Local<T, U>(T)", "t", "U", "object").WithLocation(11, 9));
9896
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "local<object>").WithArguments("local<TParameter>(int)", "parameter", "TParameter", "object").WithLocation(6, 9),
9899
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M2<object>").WithArguments("C.M2<TParameter>(int)", "parameter", "TParameter", "object").WithLocation(7, 9),
Semantics\NullableReferenceTypesTests.cs (5)
92783
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "F").WithArguments("C.F<T>(T?)", "A", "T", "B").WithLocation(8, 9));
105715
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<object>").WithArguments("A.M<T>()", "notnull", "T", "object").WithLocation(12, 9),
105748
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<object>").WithArguments("A.M<T>()", "notnull", "T", "object").WithLocation(12, 9)
145102
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M").WithArguments("C.M<T>(System.Span<T>)", "System.IEquatable<B>", "T", "B").WithLocation(18, 9),
145105
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M").WithArguments("C.M<T>(System.Span<T>)", "System.IEquatable<B>", "T", "B").WithLocation(19, 9));
Semantics\RawInterpolationTests_Handler.cs (1)
3416
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M").WithArguments("C.M<T>(T)", "CustomHandler", "T", "string").WithLocation(2, 3));
Semantics\SemanticErrorTests.cs (8)
10199
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "B").WithArguments("C<T>", "A", "T", "B").WithLocation(9, 26),
10201
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<B>").WithArguments("D.M<T>()", "A", "T", "B").WithLocation(10, 9));
10214
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "V").WithArguments("C<T, U>", "T", "U", "V").WithLocation(3, 12));
10224
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "T").WithArguments("I<T>", "I<I<I<T>>>", "T", "I<T>").WithLocation(1, 13));
10241
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "T1").WithArguments("IB<T>", "IA<object[]>", "T", "object[]").WithLocation(3, 9),
10245
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "T3").WithArguments("IB<T>", "IA<IB<T3>[]>", "T", "IB<T3>[]").WithLocation(3, 17));
10275
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "object").WithArguments("N.C<T, U>", "int", "U", "object").WithLocation(16, 24),
10278
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "G<string>").WithArguments("N.C<int, int>.G<V>()", "int", "V", "string").WithLocation(17, 31));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (67)
BadSymbolReference.cs (12)
941
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C12").WithArguments("ErrorTest.C10<T>", "ErrorTest.I1<ErrorTest.I2>", "T", "ErrorTest.I5"),
947
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C9").WithArguments("ErrorTest.C8<T>", "ErrorTest.I6<ErrorTest.I3>", "T", "ErrorTest.I6<ErrorTest.I2>"),
953
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C11").WithArguments("ErrorTest.C10<T>", "ErrorTest.I1<ErrorTest.I2>", "T", "ErrorTest.C4"),
962
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "x").WithArguments("ErrorTest.C10<T>", "ErrorTest.I1<ErrorTest.I2>", "T", "ErrorTest.C4"),
968
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "x").WithArguments("ErrorTest.C10<T>", "ErrorTest.I1<ErrorTest.I2>", "T", "ErrorTest.I5"),
974
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "x").WithArguments("ErrorTest.C8<T>", "ErrorTest.I6<ErrorTest.I3>", "T", "ErrorTest.I6<ErrorTest.I2>"),
1172
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C10").WithArguments("ErrorTest.C9<T>", "ErrorTest.I1", "T", "ErrorTest.C4"),
1178
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C11").WithArguments("ErrorTest.C9<T>", "ErrorTest.I1", "T", "ErrorTest.I5"),
1184
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "x").WithArguments("ErrorTest.C9<T>", "ErrorTest.I1", "T", "ErrorTest.I5"),
1190
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "x").WithArguments("ErrorTest.C9<T>", "ErrorTest.I1", "T", "ErrorTest.C4"),
1386
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C7").WithArguments("ErrorTest.C6<T>", "ErrorTest.C1", "T", "ErrorTest.C4"),
1392
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "x").WithArguments("ErrorTest.C6<T>", "ErrorTest.C1", "T", "ErrorTest.C4"),
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
1929
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "F").WithArguments("E.F<T>(T)", "A", "T", "B").WithLocation(8, 11)
1970
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "F").WithArguments("E.F<T>(T)", "A", "T", "B").WithLocation(8, 11));
Symbols\ExtensionMethodTests.cs (2)
3907
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "SetMember").WithArguments("Extensions.SetMember<BC, TMember>(BC, TMember)", "BaseClass<long>", "BC", "BaseClass<int>").WithLocation(7, 18)
4002
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "SetMember").WithArguments("Extensions.SetMember<BC, TMember>(BC, TMember)", "I1<long>", "BC", "BaseClass<int>").WithLocation(7, 18)
Symbols\GenericConstraintTests.cs (46)
245
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C1").WithArguments("A1<T>", "A2", "T", "C1.C2").WithLocation(7, 7));
266
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C1").WithArguments("A1<T>", "A1<C1.C2>.A2", "T", "C1.C2").WithLocation(9, 7));
316
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "Param").
816
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "B1").WithArguments("C<I<int>>.D1<U>", "I<int>", "U", "object"),
913
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "object").WithArguments("C<T>", "C<object>", "T", "object").WithLocation(5, 13));
2792
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("C2<T>", "System.Enum", "T", "string").WithLocation(11, 16),
2794
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("C3<T>", "System.ValueType", "T", "string").WithLocation(14, 16),
2796
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("C4<T>", "System.Array", "T", "string").WithLocation(17, 16),
2798
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("C5<T>", "int", "T", "string").WithLocation(20, 16),
2800
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("C6<T>", "Sealed", "T", "string").WithLocation(23, 16),
2804
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("C7<T>", "Static", "T", "string").WithLocation(26, 16),
2806
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("C8<T>", "Enum", "T", "string").WithLocation(29, 16),
2808
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "string").WithArguments("C9<T>", "Struct", "T", "string").WithLocation(32, 16));
2871
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "a").WithArguments("A<T>", "C", "T", "object").WithLocation(3, 29),
2877
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<string>").WithArguments("B.M<U>()", "C", "U", "string").WithLocation(6, 11),
3032
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "a").WithArguments("A2<T>", "B2", "T", "object").WithLocation(4, 30),
3035
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "a").WithArguments("A2<T>", "I", "T", "object").WithLocation(4, 30),
3044
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "a").WithArguments("A1<T>", "B1", "T", "object").WithLocation(3, 30),
3053
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<object>").WithArguments("A3.M<T>()", "B3", "T", "object").WithLocation(7, 12),
3101
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "a").WithArguments("A2<T>", "B2", "T", "object").WithLocation(4, 30),
3104
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "a").WithArguments("A2<T>", "I", "T", "object").WithLocation(4, 30),
3113
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "a").WithArguments("A1<T>", "B1", "T", "object").WithLocation(3, 30),
3119
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<object>").WithArguments("A3.M<T>()", "B3", "T", "object").WithLocation(7, 12),
3152
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "o").WithArguments("A0<T>", "B", "T", "object").WithLocation(3, 30),
3158
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "o").WithArguments("A<T>", "I<B>", "T", "I<object>").WithLocation(4, 32),
3164
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "o").WithArguments("AIn<T>", "IIn<B>", "T", "IIn<object>").WithLocation(5, 36),
3170
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "o").WithArguments("AOut<T>", "IOut<B>", "T", "IOut<object>").WithLocation(6, 38));
3205
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "o").WithArguments("A0<T>", "B", "T", "object").WithLocation(10, 30),
3207
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "o").WithArguments("A<T>", "I<B>", "T", "I<object>").WithLocation(11, 32),
3209
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "o").WithArguments("AIn<T>", "IIn<B>", "T", "IIn<object>").WithLocation(12, 36),
3211
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "o").WithArguments("AOut<T>", "IOut<B>", "T", "IOut<object>").WithLocation(13, 38));
3401
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C2").WithArguments("IT<T>", "?", "T", "A").WithLocation(5, 7),
3463
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C").WithArguments("I<T>", "?", "T", "A").WithLocation(5, 7),
3469
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "I<A>").WithArguments("I<T>", "?", "T", "A").WithLocation(7, 10),
3478
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<A>").WithArguments("A.M<T>()", "?", "T", "A").WithLocation(13, 17),
3484
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "A").WithArguments("I<T>", "?", "T", "A").WithLocation(15, 13),
3490
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<A>").WithArguments("I<A>.M<U>()", "?", "U", "A").WithLocation(15, 25),
3698
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "IC1").WithArguments("IA1_2<T>", "I", "T", "A").WithLocation(1, 11),
3701
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "IC1").WithArguments("IA1_3<T, U>", "A", "U", "object").WithLocation(1, 11),
3719
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C2").WithArguments("IA2_2<T>", "I", "T", "A").WithLocation(4, 7),
3722
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C2").WithArguments("IA2_3<T, U>", "A", "U", "object").WithLocation(4, 7),
5214
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "object").WithArguments("A<T, U>", "I<object>", "U", "object").WithLocation(11, 26),
5217
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<string>").WithArguments("B<I<object>>.M<U>()", "I<object>", "U", "string").WithLocation(12, 22),
5220
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<string>").WithArguments("B<I<object>>.M<U>()", "I<string>", "U", "string").WithLocation(12, 22),
5223
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<object, object>").WithArguments("C.M<T1, T2>()", "I<object>", "T2", "object").WithLocation(13, 9));
6009
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M1<V, U>").WithArguments("A<object[]>.M1<U, V>()", "V", "V", "U").WithLocation(12, 14));
Symbols\Source\BaseClassTests.cs (3)
2098
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "CrashTest.Crash<object>").WithArguments("CrashTest.Crash<T>", "CrashTest.Crash<object>.AbstractClass", "T", "object").WithLocation(2, 14),
2101
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "Class2").WithArguments("CrashTest.Crash<T>", "CrashTest.Crash<object>.AbstractClass", "T", "object").WithLocation(6, 11),
2104
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "Test").WithArguments("CrashTest.Crash<T>", "CrashTest.Crash<object>.AbstractClass", "T", "object").WithLocation(21, 23)
Symbols\SymbolDistinguisherTests.cs (2)
618
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "M<C>").WithArguments("Lib.M<T>()", "C [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", "T", "C [file.cs(2)]").WithLocation(6, 13));
748
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedRefType
, "C").WithArguments("B<T>", "A", "T", "object").WithLocation(1, 7));