53 references to ERR_GenericConstraintNotSatisfiedValType
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
859
or ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
Symbols\ConstraintsHelper.cs (1)
1205
errorCode = ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTupleEqualityTests.cs (2)
2632
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "t1").WithArguments("System.Nullable<T>", "IInterface", "T", "(int, int)").WithLocation(4, 24),
2635
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "t2").WithArguments("System.Nullable<T>", "IInterface", "T", "(long, long)").WithLocation(4, 42)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (5)
Emit\UnmanagedTypeModifierTests.cs (5)
76
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M2<int>").WithArguments("TestRef.M2<T>()", "?", "T", "int").WithLocation(9, 13),
145
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M2<int>").WithArguments("TestRef.M2<T>()", "?", "T", "int").WithLocation(9, 13),
214
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M2<int>").WithArguments("TestRef.M2<T>()", "?", "T", "int").WithLocation(9, 13),
1386
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<S1>").WithArguments("TestRef.M<T>()", "System.IComparable", "T", "Test.S1").WithLocation(10, 23)
1443
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<S1>").WithArguments("TestRef.M<T>()", "System.IComparable", "T", "Test.S1").WithLocation(10, 23)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
RefStructInterfacesTests.cs (3)
6554
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "Test1").WithArguments("Program.Test1<T>(T)", "I<string>", "T", "S").WithLocation(19, 9),
6557
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "Test2").WithArguments("Program.Test2<T>(T)", "IOut<string>", "T", "S").WithLocation(20, 9),
6560
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "Test3").WithArguments("Program.Test3<T>(T)", "IIn<object>", "T", "S").WithLocation(21, 9),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (39)
Semantics\BindingAsyncTasklikeMoreTests.cs (1)
1349
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, @"{
Semantics\DynamicTests.cs (2)
1977
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "Goo<int>").WithArguments("Program.Goo<T>(int, T)", "System.Collections.IEnumerable", "T", "int").WithLocation(8, 9));
2071
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "F<int>").WithArguments("C.F<T>(string, params T[])", "C", "T", "int").WithLocation(9, 3));
Semantics\GenericConstraintsTests.cs (31)
45
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Enum", "T", "int").WithLocation(14, 26),
106
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "E1").WithArguments("Test<T>", "System.IDisposable", "T", "E1").WithLocation(13, 26),
112
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Enum", "T", "int").WithLocation(15, 26),
115
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.IDisposable", "T", "int").WithLocation(15, 26));
142
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Enum", "T", "int").WithLocation(14, 26),
175
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Enum", "T", "int").WithLocation(14, 26),
217
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Enum", "T", "int").WithLocation(12, 26),
292
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Enum", "T", "int").WithLocation(12, 26),
331
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Enum", "T", "int").WithLocation(12, 26),
409
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Enum", "T", "int").WithLocation(14, 26));
438
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "E").WithArguments("Test<T, U>", "Test2", "U", "E").WithLocation(13, 33),
542
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<int>").WithArguments("B.M<T>()", "System.Enum", "T", "int").WithLocation(12, 14)
571
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<int>").WithArguments("B.M<T>()", "System.Enum", "T", "int").WithLocation(8, 14)
734
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Delegate", "T", "int").WithLocation(11, 26),
802
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Delegate", "T", "int").WithLocation(11, 26),
833
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Delegate", "T", "int").WithLocation(8, 26),
892
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.Delegate", "T", "int").WithLocation(8, 26),
1059
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<int>").WithArguments("B.M<T>()", "System.Delegate", "T", "int").WithLocation(13, 14)
1086
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<int>").WithArguments("B.M<T>()", "System.Delegate", "T", "int").WithLocation(9, 14)
1215
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.MulticastDelegate", "T", "int").WithLocation(11, 26),
1283
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.MulticastDelegate", "T", "int").WithLocation(11, 26),
1314
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.MulticastDelegate", "T", "int").WithLocation(8, 26),
1373
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "int").WithArguments("Test<T>", "System.MulticastDelegate", "T", "int").WithLocation(8, 26),
1544
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<int>").WithArguments("B.M<T>()", "System.MulticastDelegate", "T", "int").WithLocation(13, 14)
1571
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<int>").WithArguments("B.M<T>()", "System.MulticastDelegate", "T", "int").WithLocation(9, 14)
2356
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "Test").WithArguments("I1<T>.Test<G>(G)", "System.Enum", "G", "int").WithLocation(13, 11)
2391
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "Test").WithArguments("I1<T>.Test<G>(G)", "System.Enum", "G", "int").WithLocation(8, 11)
3007
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "IsEnum<Wrapper<int>.S>").WithArguments("Test.IsEnum<T>()", "System.Enum", "T", "Wrapper<int>.S").WithLocation(28, 9),
3010
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "IsEnum<Wrapper<string>.S>").WithArguments("Test.IsEnum<T>()", "System.Enum", "T", "Wrapper<string>.S").WithLocation(38, 9));
3273
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "UnmanagedWithInterface").WithArguments("C.UnmanagedWithInterface<T>(T*)", "System.IDisposable", "T", "int").WithLocation(20, 9));
3461
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "InnerStruct<int>").WithArguments("MyStruct<T>", "System.IDisposable", "T", "InnerStruct<int>").WithLocation(16, 18)
Semantics\SemanticErrorTests.cs (2)
10393
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "S").WithArguments("B<T>", "A", "T", "S").WithLocation(9, 26),
10395
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<int, double>").WithArguments("C.M<T, U>()", "A", "U", "double").WithLocation(10, 9));
Semantics\StackAllocSpanExpressionsTests.cs (3)
784
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "NonComparable").WithArguments("System.Span<T>", "System.IComparable", "T", "NonComparable").WithLocation(19, 14),
787
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "NonComparable[10]").WithArguments("System.Span<T>", "System.IComparable", "T", "NonComparable").WithLocation(20, 67),
790
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "NonComparable[100]").WithArguments("System.Span<T>", "System.IComparable", "T", "NonComparable").WithLocation(20, 98));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\StaticAbstractMembersInInterfacesTests.cs (1)
30469
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "I1<int>").WithArguments("I1<T>", "I1<int>", "T", "int").WithLocation(9, 21),
Symbols\SymbolDistinguisherTests.cs (1)
686
Diagnostic(ErrorCode.
ERR_GenericConstraintNotSatisfiedValType
, "M<C>").WithArguments("Lib.M<T>()", "C [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", "T", "C [file.cs(2)]").WithLocation(8, 13));