65 references to ERR_ImplBadConstraints
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
879
or ErrorCode.
ERR_ImplBadConstraints
Symbols\TypeSymbol.cs (1)
2140
diagnostics.Add(ErrorCode.
ERR_ImplBadConstraints
, GetImplicitImplementationDiagnosticLocation(interfaceMethod, implementingType, implicitImpl), typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
4950
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("TC", "C1.M<TC>((CB, (CA, TC)))", "TC", "I<CB, CA>.M<TC>((CB, (CA, TC)))").WithLocation(15, 25),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
RefStructInterfacesTests.cs (3)
5705
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M1").WithArguments("T", "C2.M1<T>()", "T", "C1.M1<T>()").WithLocation(10, 17),
5708
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M2").WithArguments("T", "C2.M2<T>()", "T", "C1.M2<T>()").WithLocation(13, 17)
5742
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M2").WithArguments("T", "C2.M2<T>()", "T", "C1<C>.M2<T>()").WithLocation(13, 17),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\BindingTests.cs (1)
1916
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M1").WithArguments("T", "C.M1<T>()", "T", "I.M1<T>()").WithLocation(7, 17),
Semantics\GenericConstraintsTests.cs (3)
2316
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "Test").WithArguments("G", "C2<T>.Test<G>(G)", "G", "I1<T>.Test<G>(G)").WithLocation(13, 17),
2350
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "Test").WithArguments("G", "C2<T>.Test<G>(G)", "G", "I1<T>.Test<G>(G)").WithLocation(9, 17),
2385
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "Test").WithArguments("G", "C2<T>.Test<G>(G)", "G", "I1<T>.Test<G>(G)").WithLocation(4, 17),
Semantics\InheritanceBindingTests.cs (1)
4761
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "Method").WithArguments("V", "Class.Method<V>(int)", "V", "Interface<int>.Method<V>(int)").WithLocation(11, 17));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (54)
Symbols\GenericConstraintTests.cs (19)
1866
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M2").WithArguments("T", "B1.M2<T>()", "U", "I<object>.M2<U>()").WithLocation(14, 17),
1869
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I<object>").WithArguments("U", "A<object>.M2<U>()", "U", "I<object>.M2<U>()").WithLocation(16, 23));
1933
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("V", "C1<T, U>.M<V>()", "V", "I1<T, U>.M<V>()").WithLocation(10, 17),
1935
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("T", "C4.M<T>()", "V", "I1<B, I>.M<V>()").WithLocation(22, 17),
1937
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("T", "C6.M<T>()", "V", "I1<A, B>.M<V>()").WithLocation(30, 17),
1939
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("U", "C7<T>.M<U>()", "U", "I2<T>.M<U>()").WithLocation(38, 17),
1941
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("T", "C8.M<T>()", "U", "I2<A>.M<U>()").WithLocation(42, 17),
1943
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("T", "C9.M<T>()", "U", "I2<B>.M<U>()").WithLocation(46, 17));
1990
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I").WithArguments("T", "A2.M<T>()", "T", "I.M<T>()").WithLocation(16, 16),
1993
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I").WithArguments("T", "A3.M<T>()", "T", "I.M<T>()").WithLocation(23, 16),
1996
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("T", "A4.M<T>()", "T", "I.M<T>()").WithLocation(28, 17),
1999
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I").WithArguments("T", "A4.M<T>()", "T", "I.M<T>()").WithLocation(30, 16));
2048
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I").WithArguments("T", "A2.M<T>()", "T", "I.M<T>()").WithLocation(2, 16),
2051
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I").WithArguments("T", "A3.M<T>()", "T", "I.M<T>()").WithLocation(3, 16),
2054
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I").WithArguments("T", "A4.M<T>()", "T", "I.M<T>()").WithLocation(4, 16),
3303
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I").WithArguments("T", "B.M<T>()", "T", "I.M<T>()").WithLocation(13, 15),
3306
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("T", "C2.M<T>()", "T", "I.M<T>()").WithLocation(18, 21));
3349
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "I").WithArguments("T", "B.M<T>()", "T", "I.M<T>()").WithLocation(1, 15));
3413
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("T", "C3.M<T>()", "T", "I.M<T>()").WithLocation(14, 25));
Symbols\SymbolErrorTests.cs (35)
5111
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "A1").WithArguments("T", "C.A1<T>()", "T", "I.A1<T>()").WithLocation(38, 17),
5113
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "A2").WithArguments("U", "C.A2<T, U>()", "U", "I.A2<T, U>()").WithLocation(39, 17),
5115
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "A3").WithArguments("T", "C.A3<T>()", "T", "I.A3<T>()").WithLocation(40, 17),
5117
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "A4").WithArguments("T", "C.A4<T, U>()", "T", "I.A4<T, U>()").WithLocation(41, 17),
5119
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "B1").WithArguments("T", "C.B1<T>()", "T", "I.B1<T>()").WithLocation(43, 17),
5121
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "B2").WithArguments("T", "C.B2<T>()", "T", "I.B2<T>()").WithLocation(44, 17),
5123
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "B3").WithArguments("T", "C.B3<T, U>()", "T", "I.B3<T, U>()").WithLocation(45, 17),
5125
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "C1").WithArguments("T", "C.C1<T>()", "T", "I.C1<T>()").WithLocation(47, 17),
5127
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "C2").WithArguments("T", "C.C2<T>()", "T", "I.C2<T>()").WithLocation(48, 17),
5129
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "C3").WithArguments("U", "C.C3<T, U>()", "U", "I.C3<T, U>()").WithLocation(49, 17),
5131
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "E1").WithArguments("T", "C.E1<T, U>()", "T", "I.E1<T, U>()").WithLocation(54, 17),
5133
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "E1").WithArguments("U", "C.E1<T, U>()", "U", "I.E1<T, U>()").WithLocation(54, 17),
5135
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "F1").WithArguments("U", "C.F1<T, U>()", "U", "I.F1<T, U>()").WithLocation(56, 17),
5137
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "G1").WithArguments("U", "C.G1<T, U>()", "U", "I.G1<T, U>()").WithLocation(58, 17),
5139
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "H2").WithArguments("T", "C.H2<T, U>()", "T", "I.H2<T, U>()").WithLocation(61, 17),
5141
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "H2").WithArguments("U", "C.H2<T, U>()", "U", "I.H2<T, U>()").WithLocation(61, 17),
5143
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "K1").WithArguments("U", "C.K1<U, T>()", "T", "I.K1<T, U>()").WithLocation(64, 17),
5145
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "K1").WithArguments("T", "C.K1<U, T>()", "U", "I.K1<T, U>()").WithLocation(64, 17));
5171
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M2").WithArguments("U", "C1.M2<U>()", "U", "I<IB>.M2<U>()").WithLocation(11, 17),
5173
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M2").WithArguments("X", "C2<T, U>.M2<X>()", "U", "I<IA<U>>.M2<U>()").WithLocation(16, 17));
5240
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("U", "C1<T>.M<U>()", "U", "I1<T>.M<U>()").WithLocation(9, 17),
5244
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("U", "C2.M<U>()", "U", "I2<B>.M<U>()").WithLocation(17, 17),
5246
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("U", "C2<T>.M<U>()", "U", "I2<T>.M<U>()").WithLocation(21, 17),
5248
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("U", "C3.M<U>()", "U", "I3<B>.M<U>()").WithLocation(29, 17),
5250
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("U", "C3<T>.M<U>()", "U", "I3<T>.M<U>()").WithLocation(33, 17),
5252
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("U", "C4<T>.M<U>()", "U", "I4<T>.M<U>()").WithLocation(45, 17),
5254
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M").WithArguments("U", "C5<T>.M<U>()", "U", "I5<T>.M<U>()").WithLocation(57, 17));
5278
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M2").WithArguments("Y", "C.M2<X, Y>()", "U", "IA.M2<T, U>()").WithLocation(14, 26),
5280
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M1").WithArguments("T", "C.M1<T>()", "T", "IB.M1<T>()").WithLocation(13, 26));
5328
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "IA<T, U>").WithArguments("V", "A<T, U>.A2<V>()", "V", "IA<T, U>.A2<V>()").WithLocation(30, 27),
5331
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "IA<T, U>").WithArguments("V", "A<T, U>.A1<V>()", "V", "IA<T, U>.A1<V>()").WithLocation(30, 27),
5334
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "IB<T>").WithArguments("U", "B<T>.B2<U, V>()", "U", "IB<T>.B2<U, V>()").WithLocation(36, 21),
5337
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "IB<T>").WithArguments("U", "B<T>.B1<U>()", "U", "IB<T>.B1<U>()").WithLocation(36, 21));
5370
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M1").WithArguments("T", "B2.M1<T>()", "T", "IB.M1<T>()").WithLocation(22, 26),
5372
Diagnostic(ErrorCode.
ERR_ImplBadConstraints
, "M2").WithArguments("T", "B2.M2<T>()", "T", "IB.M2<T>()").WithLocation(23, 26));