72 references to ERR_UnmanagedConstraintNotSatisfied
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
1885
or ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
Symbols\ConstraintsHelper.cs (1)
1019
diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type))));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (17)
Semantics\ExtensionTests.cs (14)
15010
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("E.extension<T>(T)", "T", "Container").WithLocation(1, 11),
15032
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("E.M<T>(T)", "T", "Container").WithLocation(1, 17),
15049
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("E.M<T>(object, T)", "T", "Container").WithLocation(1, 14),
15203
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("E.extension(int).M<T>(T)", "T", "Container").WithLocation(1, 5),
19296
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("S1.M<T>(T)", "T", "S1").WithLocation(6, 9));
19333
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("S1.M<T>(T)", "T", "S1").WithLocation(6, 9));
19381
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("S1.M<T>(T)", "T", "S1").WithLocation(6, 9));
19479
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("S1.M<T>(T)", "T", "S1").WithLocation(6, 9));
19529
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("S1.M<T>(T)", "T", "S1").WithLocation(6, 9));
19583
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("N.S1.M<T>(T)", "T", "N.S1").WithLocation(8, 13));
19637
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("N.S1.M<T>(T)", "T", "N.S1").WithLocation(8, 13));
19691
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("N.S1.M<T>(T)", "T", "N.S1").WithLocation(8, 13));
19787
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("S1.M<T>(T)", "T", "S1").WithLocation(6, 9));
19950
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("S1.M<T>(T)", "T", "S1").WithLocation(6, 9));
Semantics\PrimaryConstructorTests.cs (3)
11837
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "Test").WithArguments("Program.Test<T>(T)", "T", "S1").WithLocation(15, 9)
22246
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "S1").WithArguments("Test<T>", "T", "S1").WithLocation(6, 18)
22254
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "S1").WithArguments("Test<T>", "T", "S1").WithLocation(6, 18)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (53)
Semantics\FunctionPointerTests.cs (1)
3668
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "ptr").WithArguments("D<T>", "T", "T").WithLocation(8, 32),
Semantics\GenericConstraintsTests.cs (47)
1722
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "BadType").WithArguments("Test<T>", "T", "BadType").WithLocation(12, 26),
1725
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "string").WithArguments("Test<T>", "T", "string").WithLocation(13, 26),
1728
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "W").WithArguments("Test<T>", "T", "W").WithLocation(16, 26));
1755
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<BadType>").WithArguments("Test.M<T>()", "T", "BadType").WithLocation(13, 28),
1758
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<string>").WithArguments("Test.M<T>()", "T", "string").WithLocation(14, 28),
1761
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<W>").WithArguments("Test.M<T>()", "T", "W").WithLocation(17, 28)
1783
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "b").WithArguments("D<T>", "T", "BadType").WithLocation(8, 32),
1786
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "c").WithArguments("D<T>", "T", "string").WithLocation(9, 31),
1789
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "f").WithArguments("D<T>", "T", "W").WithLocation(12, 26));
1816
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<BadType>").WithArguments("M<T>()", "T", "BadType").WithLocation(13, 9),
1819
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<string>").WithArguments("M<T>()", "T", "string").WithLocation(14, 9),
1822
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<W>").WithArguments("M<T>()", "T", "W").WithLocation(17, 9));
2001
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "BadType").WithArguments("Test<T>", "T", "BadType").WithLocation(9, 26),
2004
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "string").WithArguments("Test<T>", "T", "string").WithLocation(10, 26),
2007
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "W").WithArguments("Test<T>", "T", "W").WithLocation(13, 26));
2037
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<BadType>").WithArguments("Test.M<T>()", "T", "BadType").WithLocation(9, 28),
2040
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<string>").WithArguments("Test.M<T>()", "T", "string").WithLocation(10, 28),
2043
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<W>").WithArguments("Test.M<T>()", "T", "W").WithLocation(13, 28)
2069
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "b").WithArguments("D<T>", "T", "BadType").WithLocation(7, 32),
2072
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "c").WithArguments("D<T>", "T", "string").WithLocation(8, 31),
2075
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "f").WithArguments("D<T>", "T", "W").WithLocation(11, 26));
2108
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "Legacy").WithArguments("Test<T>", "T", "Legacy").WithLocation(7, 26));
2231
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<string>").WithArguments("B.M<T>()", "T", "string").WithLocation(17, 14),
2234
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<Test>").WithArguments("B.M<T>()", "T", "Test").WithLocation(18, 14)
2265
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<string>").WithArguments("B.M<T>()", "T", "string").WithLocation(13, 14),
2268
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<Test>").WithArguments("B.M<T>()", "T", "Test").WithLocation(14, 14)
2313
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "C2").WithArguments("I1<T>", "T", "T").WithLocation(11, 14),
2319
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "T").WithArguments("I1<T>", "T", "T").WithLocation(15, 12),
2322
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "Test").WithArguments("I1<T>.Test<G>(G)", "G", "Segment<int>").WithLocation(16, 11)
2475
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("Test.M<T>(T)", "T", "string").WithLocation(9, 9));
2710
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "N<TestData>").WithArguments("Test.N<T>()", "T", "TestData").WithLocation(24, 9));
2764
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("Test.M<T>(T)", "T", "string").WithLocation(16, 9),
3324
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M2").WithArguments("C.M2<T>(MyStruct<T>*)", "T", "string").WithLocation(12, 9),
3496
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "U").WithArguments("MyStruct<T>", "T", "U").WithLocation(11, 18),
3502
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M2<U>").WithArguments("MyStruct<T>", "T", "U").WithLocation(12, 9),
3511
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "ms").WithArguments("MyStruct<T>", "T", "V").WithLocation(15, 43));
3630
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "T").WithLocation(4, 26),
3686
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "MyStruct<MyStruct<T>>").WithLocation(4, 46));
3714
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "MyStruct<MyStruct<T>>").WithLocation(5, 46));
3742
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "MyStruct<MyStruct<T>>").WithLocation(4, 46));
3770
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "MyStruct<MyStruct<T>>").WithLocation(5, 46));
3805
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "MyStruct<MyStruct<T>>").WithLocation(6, 52)
3840
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "MyStruct<MyStruct<T>>").WithLocation(7, 52)
3869
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "MyStruct<MyStruct<T>>").WithLocation(4, 46));
3897
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "field").WithArguments("YourStruct<T>", "T", "MyStruct<MyStruct<T>>").WithLocation(4, 46));
4228
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<MyStruct<V>>").WithArguments("C.M<T>()", "T", "MyStruct<V>").WithLocation(18, 9)
4235
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M<MyStruct<V>>").WithArguments("C.M<T>()", "T", "MyStruct<V>").WithLocation(18, 9)
Semantics\RecordStructTests.cs (1)
461
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "c").WithArguments("C<T>", "T", "Point2").WithLocation(8, 23)
Semantics\UseSiteErrorTests.cs (4)
2656
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("C.M<T>(T)", "T", "S2").WithLocation(8, 9),
2662
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("C.M<T>(T)", "T", "S2").WithLocation(9, 9),
2696
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("C.M<T>(T)", "T", "S3").WithLocation(13, 9),
2702
Diagnostic(ErrorCode.
ERR_UnmanagedConstraintNotSatisfied
, "M").WithArguments("C.M<T>(T)", "T", "S3").WithLocation(14, 9),