305 references to ERR_AmbigCall
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1446
return new DiagnosticInfoWithSymbols(ErrorCode.
ERR_AmbigCall
, arguments, symbols);
Errors\ErrorFacts.cs (1)
656
case ErrorCode.
ERR_AmbigCall
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (22)
BreakingChanges.cs (1)
1359
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(params double[])", "C.M(params G<int>[])"));
CodeGen\CodeGenConstructorInitTests.cs (4)
1288
Diagnostic(ErrorCode.
ERR_AmbigCall
, "").WithArguments("C.C()", "C.C()").WithLocation(4, 18)
1310
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this").WithArguments("C.C()", "C.C()").WithLocation(4, 18),
1335
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this").WithArguments("C.C()", "C.C()").WithLocation(4, 18),
1360
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this").WithArguments("C.C()", "C.C()").WithLocation(4, 18),
CodeGen\CodeGenFunctionPointersTests.cs (5)
3100
Diagnostic(ErrorCode.
ERR_AmbigCall
, "IHelpers.M").WithArguments("IHelpers.M(I1)", "IHelpers.M(I2)").WithLocation(13, 35)
3443
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(string, object)", "C.M(object, string)").WithLocation(8, 48)
4040
Diagnostic(ErrorCode.
ERR_AmbigCall
, "D").WithArguments("Program1.D(delegate*<int, void>)", "Program1.D(delegate*<long, void>)").WithLocation(11, 9)
5998
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(delegate*<I1>)", "C.M1(delegate*<I2>)").WithLocation(11, 9)
6130
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(delegate*<delegate*<I1, void>, void>)", "C.M1(delegate*<delegate*<I2, void>, void>)").WithLocation(11, 9)
CodeGen\CodeGenImplicitImplementationTests.cs (1)
825
Diagnostic(ErrorCode.
ERR_AmbigCall
, "BaseGoo").WithArguments("IBase1.BaseGoo()", "IBase2.BaseGoo()"));
CodeGen\CodeGenRefReturnTests.cs (2)
3501
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test").WithArguments("Program.Test(Program.RefFunc1<Derived2, Base>)", "Program.Test(Program.RefFunc1<Derived2, Derived1>)").WithLocation(25, 9),
3504
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test").WithArguments("Program.Test(Program.RefFunc1<Derived2, Base>)", "Program.Test(Program.RefFunc1<Derived2, Derived1>)").WithLocation(26, 9)
CodeGen\CodeGenTupleTest.cs (6)
7726
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test").WithArguments("C.Test(System.Func<(System.Func<short>, int)>)", "C.Test(System.Func<(System.Func<byte>, int)>)").WithLocation(26, 9)
17036
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("NS2.C2.M1(string, (int, int))", "NS1.C1.M1(string, (int, int))").WithLocation(10, 13)
21192
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C1.M(string, (int, int))", "C2.M(string, (int a, int b))").WithLocation(18, 18),
21195
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C1.M(string, (int, int))", "C2.M(string, (int a, int b))").WithLocation(19, 18),
21198
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C1.M(string, (int, int))", "C2.M(string, (int a, int b))").WithLocation(20, 18)
26236
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1<T, U>((T, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, (U, int)))", "C.M1<T, U>(((T, int), int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, U))").WithLocation(7, 9)
CodeGen\PatternTests.cs (1)
4855
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("Program.M2(System.Exception)", "Program.M2(int)").WithLocation(12, 16)
CodeGen\UnsafeTests.cs (2)
4400
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new Fixable(1)").WithArguments("FixableExt.GetPinnableReference(in Fixable)", "FixableExt1.GetPinnableReference(in Fixable)").WithLocation(6, 25),
4406
Diagnostic(ErrorCode.
ERR_AmbigCall
, "f").WithArguments("FixableExt.GetPinnableReference(in Fixable)", "FixableExt1.GetPinnableReference(in Fixable)").WithLocation(12, 25),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
Attributes\AttributeTests.cs (1)
5608
Diagnostic(ErrorCode.
ERR_AmbigCall
, "X(A.dyn)").WithArguments("XAttribute.XAttribute(ref int)", "XAttribute.XAttribute(e1)").WithLocation(37, 2),
Diagnostics\MethodGroupConversion.cs (3)
53
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(I1)", "Program.M(I2)").WithLocation(7, 13),
56
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(I1)", "Program.M(I2)").WithLocation(8, 19),
59
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(I1)", "Program.M(I2)").WithLocation(9, 12),
Semantics\PatternMatchingTests4.cs (2)
2003
Diagnostic(ErrorCode.
ERR_AmbigCall
, "(x, y)").WithArguments("I1.Deconstruct(out int, out int)", "I2.Deconstruct(out int, out int)").WithLocation(8, 22)
2049
Diagnostic(ErrorCode.
ERR_AmbigCall
, "(var x, var y)").WithArguments("I1.Deconstruct(out int, out int)", "I2.Deconstruct(out int, out int)").WithLocation(8, 18)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
EvaluationContext.cs (1)
456
case ErrorCode.
ERR_AmbigCall
:
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IDefaultValueOperation.cs (1)
97
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("C.M2(int)", "C.M2(string)").WithLocation(6, 9)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (240)
Semantics\AmbiguousOverrideTests.cs (8)
103
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Base<TLong, TInt>.Method(long, TInt)", "Base<TLong, TInt>.Method(TLong, int)"));
215
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Base<T, U>.Method(T, U)", "Base<T, U>.Method(U, T)").WithLocation(21, 14)
238
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Base<T, U>.Method(T, U)", "Base<T, U>.Method(U, T)").WithLocation(21, 14)
341
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Metadata.LeastModoptsWinAmbiguous.M(byte, byte)", "Metadata.LeastModoptsWinAmbiguous.M(byte, byte)")
1194
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("CG<T>.F(T)", "CG<T>.F(T)"),
1197
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("CG<T>.F(T)", "CG<T>.F(T)"),
1200
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("CG<T>.F(T)", "CG<T>.F(T)"),
1203
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("CG<T>.F(T)", "CG<T>.F(T)"));
Semantics\ArglistTests.cs (2)
1573
Diagnostic(ErrorCode.
ERR_AmbigCall
, "ArgListMethod").WithArguments("SpecialCases.ArgListMethod(__arglist)", "SpecialCases.ArgListMethod(__arglist)").WithLocation(6, 9),
1576
Diagnostic(ErrorCode.
ERR_AmbigCall
, "ArgListMethod").WithArguments("SpecialCases.ArgListMethod(__arglist)", "SpecialCases.ArgListMethod(__arglist)").WithLocation(10, 9)
Semantics\BetterCandidates.cs (38)
56
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(5, 17)
83
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(6, 11)
114
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(10, 14)
148
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(15, 14)
181
Diagnostic(ErrorCode.
ERR_AmbigCall
, "null").WithArguments("MyCollection.Add(A)", "MyCollection.Add(B)").WithLocation(5, 28)
305
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o").WithArguments("MyDeconstructable.Deconstruct(out int, out int)", "MyDeconstructable.Deconstruct(out long, out long)").WithLocation(6, 26),
480
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(5, 9)
509
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(9, 13)
539
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(7, 29)
570
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(6, 9)
599
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(5, 27)
604
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(5, 27)
629
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(5, 9)
634
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(5, 9)
660
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Color.M(A)", "Color.M(B)").WithLocation(6, 15)
665
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Color.M(A)", "Color.M(B)").WithLocation(6, 15)
721
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, B)", "Program.M<T>(T, X)").WithLocation(5, 9),
724
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, B)", "Program.M<T>(T, X)").WithLocation(6, 9)
758
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(5, 9)
789
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(6, 9)
820
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(6, 9)
861
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(5, 9)
1057
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(6, 17),
1060
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(7, 11),
1063
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(8, 9),
1066
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(13, 9),
1069
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(14, 17)
1074
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(C)").WithLocation(6, 17),
1077
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(B)", "Program.M(D)").WithLocation(7, 11),
1080
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(C)").WithLocation(8, 9),
1083
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(13, 9),
1086
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(14, 17)
1158
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, A)", "Program.M<T>(T, B)").WithLocation(5, 9)
1163
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, B)", "Program.M<T>(T, D)").WithLocation(5, 9)
1206
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Extensions.M<T>(T, A)", "Extensions.M<T>(T, B)").WithLocation(5, 11)
1211
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Extensions.M<T>(T, B)", "Extensions.M<T>(T, D)").WithLocation(5, 11)
1259
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Argument").WithArguments("Program.Argument(IQ)", "Program.Argument(IW)").WithLocation(5, 17)
1264
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Argument").WithArguments("Program.Argument(IQ)", "Program.Argument(IX)").WithLocation(5, 17)
Semantics\BindingAsyncTasklikeTests.cs (2)
190
Assert.True(diagnostics.First().Code == (int)ErrorCode.
ERR_AmbigCall
);
427
Diagnostic(ErrorCode.
ERR_AmbigCall
, "h").WithArguments("C.h(System.Func<MyTask>)", "C.h(System.Func<System.Threading.Tasks.Task>)").WithLocation(8, 9)
Semantics\BindingAwaitTests.cs (12)
397
Diagnostic(ErrorCode.
ERR_AmbigCall
, "GetAwaiter").WithArguments("Test.GetAwaiter(A)", "E.GetAwaiter(A)"),
400
Diagnostic(ErrorCode.
ERR_AmbigCall
, "GetAwaiter").WithArguments("Test.GetAwaiter(B)", "E.GetAwaiter(B)"),
403
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("Test.GetAwaiter(A)", "E.GetAwaiter(A)"),
406
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new B()").WithArguments("Test.GetAwaiter(B)", "E.GetAwaiter(B)")
458
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E.GetAwaiter(I1)", "E.GetAwaiter(I2)")
618
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("Test.GetAwaiter(A)", "E.GetAwaiter(A)"));
738
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E1.GetAwaiter(A)", "E2.GetAwaiter(A)")
785
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E1.GetAwaiter(A)", "E2.GetAwaiter(A)")
862
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("Test.GetAwaiter(object)", "EE.GetAwaiter(object)")
905
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("Test.GetAwaiter(object)", "EE.GetAwaiter(object)")
1137
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E1.GetAwaiter(A)", "E2.GetAwaiter(A)")
1188
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E1.GetAwaiter(A)", "E2.GetAwaiter(A)")
Semantics\BindingTests.cs (3)
358
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("A.F(object, string)", "A.F(string, object)").WithLocation(18, 11),
612
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("S.M(double, A)", "S.M(double, B)").WithLocation(12, 11),
659
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("C.F(int, double)", "C.F(double, int)").WithLocation(7, 9),
Semantics\DeconstructionTests.cs (1)
1377
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new C()").WithArguments("Base.Deconstruct(out int, out int)", "Base.Deconstruct(out long, out long)").WithLocation(12, 28)
Semantics\DelegateTypeTests.cs (20)
1243
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this.F<object>").WithArguments("A.F<T>(T)", "B.F<T>(T)").WithLocation(5, 29)
1250
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this.F<object>").WithArguments("A.F<T>(T)", "B.F<T>(T)").WithLocation(5, 29)
2235
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new S().F").WithArguments("E1.F(S)", "E2.F(S)").WithLocation(8, 22));
3502
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Func<System.Func<object>>, int)", "Program.F(System.Func<System.Func<int>>, object)").WithLocation(12, 9),
3505
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Func<System.Func<object>>, int)", "Program.F(System.Func<System.Func<int>>, object)").WithLocation(13, 9),
3508
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Func<System.Func<object>>, int)", "Program.F(System.Func<System.Func<int>>, object)").WithLocation(14, 9)
3535
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F<T>(System.Action<T>)", "Program.F(StringAction)").WithLocation(8, 9)
3598
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F<T>(System.Action<T>)", "Program.F<T>(MyAction<T>)").WithLocation(9, 9),
3633
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Action<string>)", "Program.F(StringAction)").WithLocation(10, 9),
3636
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Action<string>)", "Program.F(StringAction)").WithLocation(11, 9)
3920
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, System.Func<object>)", "Program.M<T>(System.Func<object>, T)").WithLocation(9, 9),
3923
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, System.Func<object>)", "Program.M<T>(System.Func<object>, T)").WithLocation(10, 9)
4192
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Delegate, System.Delegate, string)", "Program.F(System.Func<int>, System.Delegate, MyString)").WithLocation(12, 9)
4293
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Linq.Expressions.Expression)", "C.M(System.Delegate)").WithLocation(10, 9),
4296
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Linq.Expressions.Expression)", "C.M(System.Delegate)").WithLocation(11, 9)
4491
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Func<System.Func<object>>, int)", "Program.F(System.Func<System.Func<int>>, object)").WithLocation(12, 9)
4599
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(Program.D1)", "Program.F(Program.D2)").WithLocation(9, 17));
4644
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(Program.D1)", "Program.F(Program.D2)").WithLocation(11, 17));
15600
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(Del)", "C.M(System.Action<decimal>)").WithLocation(1, 9)
15793
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(Del)", "C.M(System.Action<System.DateTime>)").WithLocation(5, 9)
Semantics\GlobalUsingDirectiveTests.cs (4)
4468
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("NS1.C5.M5(int)", "NS.C2.M5(int)").WithLocation(7000, 11)
4486
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("NS1.C5.M5(int)", "NS.C4.M5(int)").WithLocation(7000, 11)
4493
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("NS.C2.M5(int)", "NS3.C5.M5(int)").WithLocation(7000, 11)
4500
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("NS3.C5.M5(int)", "NS.C4.M5(int)").WithLocation(7000, 11)
Semantics\ImplicitObjectCreationTests.cs (10)
911
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new(new(), new())").WithArguments("C.C(object, C)", "C.C(C, object)").WithLocation(9, 15)
1649
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A, int)", "Program.M(B, object)").WithLocation(18, 9)
2405
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(int)", "C.M(string)").WithLocation(6, 9)
3159
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(params object[])", "C.M(params int[])").WithLocation(6, 9)
3181
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(params object[])", "C.M(C)").WithLocation(6, 9)
4116
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Write").WithArguments("System.Console.Write(bool)", "System.Console.Write(char)").WithLocation(7, 24)
4221
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(int[])", "C.M(int)").WithLocation(6, 9),
4426
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("A.M(B)", "A.M(string)").WithLocation(6, 11),
4431
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("A.M(B)", "A.M(string)").WithLocation(7, 11),
4436
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("A.M(B)", "A.M(string)").WithLocation(8, 11)
Semantics\InheritanceBindingTests.cs (5)
7921
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method<string>").WithArguments("I1<T, U>.Method<V>(T, System.Func<U, T, V>, U)", "I1<T, U>.Method<Z>(U, System.Func<T, U, Z>, T)"),
7924
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method<string>").WithArguments("I1<T, U>.Method<V>(T, System.Func<U, T, V>, U)", "I1<T, U>.Method<Z>(U, System.Func<T, U, Z>, T)"),
7927
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method<string>").WithArguments("I1<T, U>.Method<V>(T, System.Func<U, T, V>, U)", "I1<T, U>.Method<Z>(U, System.Func<T, U, Z>, T)"));
8018
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("I1<T, U>.Method(T, U[])", "I1<T, U>.Method(U, params T[])"),
8021
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("I1<T, U>.Method(T, System.Func<T, U>, U[])", "I1<T, U>.Method(U, System.Func<T, U>, params U[])"));
Semantics\InterpolationTests.cs (3)
5044
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(CustomHandler1)", "C.M(CustomHandler2)").WithLocation(2, 3)
5793
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Func<bool, string>)", "C.M(System.Func<bool, CustomHandler>)").WithLocation(3, 3)
5827
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Action<string>)", "C.M(System.Action<CustomHandler>)").WithLocation(3, 3)
Semantics\LambdaTests.cs (1)
287
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("C.Goo(System.Func<System.IComparable<I>>)", "C.Goo(System.Func<I>)").WithLocation(12, 9));
Semantics\NameCollisionTests.cs (4)
1845
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("A.M(System.Action<double>)", "A.M(System.Action<long>)").WithLocation(11, 22),
1854
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("A.M(System.Action<double>)", "A.M(System.Action<long>)").WithLocation(17, 22),
1863
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("A.M(System.Action<double>)", "A.M(System.Action<long>)").WithLocation(11, 22),
1869
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("A.M(System.Action<double>)", "A.M(System.Action<long>)").WithLocation(17, 22),
Semantics\ObjectAndCollectionInitializerTests.cs (1)
2749
Diagnostic(ErrorCode.
ERR_AmbigCall
, "{ 1, 2 }").WithArguments("D.Add(int, float)", "D.Add(float, int)").WithLocation(11, 27),
Semantics\OperatorTests.cs (1)
1631
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("Program.Goo(System.Func<System.Action<object>, System.IComparable>)", "Program.Goo(System.Func<System.Action<dynamic>, System.IConvertible>)"));
Semantics\OutVarTests.cs (3)
19465
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test1").WithArguments("Cls.Test1(out int, object)", "Cls.Test1(out short, object)").WithLocation(6, 9)
33389
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(out object)", "C.M(out int)").WithLocation(8, 9),
33392
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(out object)", "C.M(out int)").WithLocation(9, 9),
Semantics\OverloadResolutionPerfTests.cs (1)
43
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("C.F(C0)", "C.F(C1)").WithLocation(3, 23));
Semantics\OverloadResolutionTests.cs (79)
160
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("P.M(string, System.Action<string>)", "P.M(object, System.Action<object>)"),
163
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(string, System.Func<object>)", "P.M1(object, System.Func<System.ValueType>)"),
166
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("P.M4(System.Func<object>, System.Action<object>, System.Action<string>)", "P.M4(System.Func<System.ValueType>, System.Action<string>, System.Action<object>)"),
169
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("P.M6(System.Action<object>, string, object)", "P.M6(System.Action<string>, object, string)")
341
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(P.DA)", "P.M1(P.DB)")
392
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(P.DA, object)", "P.M1(P.DB, int)").WithLocation(15, 5));
440
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(CA)", "P.M1(CB)")
480
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(System.Threading.Tasks.Task<int>, uint)", "P.M1(System.Threading.Tasks.Task<uint>, int)")
519
Diagnostic(ErrorCode.
ERR_AmbigCall
, "h").WithArguments("C.h<T>(System.Func<System.Threading.Tasks.Task<T>>)", "C.h<T>(System.Func<MyTask<T>>)").WithLocation(9, 9)
568
Diagnostic(ErrorCode.
ERR_AmbigCall
, "k").WithArguments("C.k<T>(System.Func<YourTask<T>>)", "C.k<T>(System.Func<MyTask<T>>)").WithLocation(9, 9)
1170
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(System.Func<int>, uint)", "P.M1(System.Func<uint>, int)"),
1173
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("P.M2(System.Func<int>, uint)", "P.M2(System.Action, int)")
1382
Diagnostic(ErrorCode.
ERR_AmbigCall
, "X").WithArguments("C.X(params string[])", "C.X<T>(T)").WithLocation(9, 9)
3759
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("IRef1.M5(ref int)", "IRef1.M5(ref long)"),
3762
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("IRef1.M5(ref int)", "IRef1.M5(ref long)"),
3765
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("IRef1.M5(ref int)", "IRef1.M5(ref long)"),
3768
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("IRef1.M5(ref int)", "IRef1.M5(ref long)"),
3774
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref char)", "IRef1.M6(ref long)"),
3777
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref char)", "IRef1.M6(ref long)"),
5185
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[10]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5188
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[10]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5191
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4['c']").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5194
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4['c']").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5197
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[i]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5200
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[i]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5203
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[c]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5206
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[c]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5215
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P5['c']").WithArguments("IA.P5[ref long]", "IA.P5[ref char]"),
5218
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P5['c']").WithArguments("IA.P5[ref long]", "IA.P5[ref char]"),
5221
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P5[c]").WithArguments("IA.P5[ref long]", "IA.P5[ref char]"),
5224
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P5[c]").WithArguments("IA.P5[ref long]", "IA.P5[ref char]"),
6037
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("IRef1.M4(ref int, long)", "IRef1.M4(ref int, ref int)"),
6040
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("IRef1.M4(ref int, long)", "IRef1.M4(ref int, ref int)"),
6052
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("IRef1.M4(ref int, long)", "IRef1.M4(ref int, ref int)"),
6055
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("IRef1.M4(ref int, long)", "IRef1.M4(ref int, ref int)"),
6100
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref int, int)", "IRef1.M6(ref long, int)"),
6106
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref int, int)", "IRef1.M6(ref long, int)"),
6115
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref int, int)", "IRef1.M6(ref long, int)"),
6121
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref int, int)", "IRef1.M6(ref long, int)"),
6133
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M7").WithArguments("IRef1.M7(ref int, long)", "IRef1.M7(ref long, ref int)"),
6136
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M7").WithArguments("IRef1.M7(ref int, long)", "IRef1.M7(ref long, ref int)"),
6142
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M7").WithArguments("IRef1.M7(ref int, long)", "IRef1.M7(ref long, ref int)"),
6145
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M7").WithArguments("IRef1.M7(ref int, long)", "IRef1.M7(ref long, ref int)"),
6166
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M8").WithArguments("IRef1.M8(long, ref int)", "IRef1.M8(ref long, int)"),
6169
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M8").WithArguments("IRef1.M8(long, ref int)", "IRef1.M8(ref long, int)"),
6178
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M8").WithArguments("IRef1.M8(long, ref int)", "IRef1.M8(ref long, int)"),
6226
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M9").WithArguments("IRef1.M9(ref long, ref int)", "IRef1.M9(ref int, ref long)"),
6229
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M9").WithArguments("IRef1.M9(ref long, ref int)", "IRef1.M9(ref int, ref long)"),
6235
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M9").WithArguments("IRef1.M9(ref long, ref int)", "IRef1.M9(ref int, ref long)"),
6238
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M9").WithArguments("IRef1.M9(ref long, ref int)", "IRef1.M9(ref int, ref long)"),
6491
Diagnostic(ErrorCode.
ERR_AmbigCall
, "overload1").WithArguments("Ambig.overload1(byte, goo)", "Ambig.overload1(int, baz)").WithLocation(6, 9),
6494
Diagnostic(ErrorCode.
ERR_AmbigCall
, "overload2").WithArguments("Ambig.overload2(int, baz)", "Ambig.overload2(byte, goo)").WithLocation(7, 9)
6569
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Ambig.F(P1)", "Ambig.F(P2)"));
7086
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("Test.Goo(Test.nongenerics, dynamic)", "Test.Goo<T>(Test.generics<T>, dynamic)")
7626
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M<T>(System.Func<bool, T>)", "C.M<T>(System.Func<byte, T>)").WithLocation(8, 44)
7840
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test").WithArguments("A.B.X.Test(int)", "A.C.X.Test(int)").WithLocation(30, 19)
7920
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Create").WithArguments("ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, bool>)", "ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, V>, params System.Func<T, bool>[])").WithLocation(25, 38)
8000
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Create").WithArguments("ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, bool>, params int[])", "ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, V>)").WithLocation(25, 38)
8042
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Create").WithArguments("ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, V>)", "ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, bool>, params int[])").WithLocation(25, 38)
8084
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Create").WithArguments("ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, V>, params System.Func<T, bool>[])", "ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, bool>)").WithLocation(25, 38)
8124
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Create").WithArguments("ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, bool>, params int[])", "ConsoleApplication2.Program.Bar<T, V>.Create(System.Func<T, V>, params int[])").WithLocation(23, 38)
8637
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test2").WithArguments("VS2015CompilerBug.VS2015CompilerBug.Test2(int, int)", "VS2015CompilerBug.VS2015CompilerBug.Test2(int, int, int)").WithLocation(9, 39),
8640
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test3").WithArguments("VS2015CompilerBug.VS2015CompilerBug.Test3(int, int, int, int)", "VS2015CompilerBug.VS2015CompilerBug.Test3(int, int, int)").WithLocation(10, 39)
8698
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Test.M1(object, object, string)", "Test.M1(string, object, object)").WithLocation(14, 9)
8978
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Should").WithArguments("FluentAssertions.AssertionExtensions.Should<TKey, TValue>(System.Collections.Generic.IDictionary<TKey, TValue>)", "Extensions.TestExtensions.Should<TKey, TValue>(System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>)").WithLocation(34, 18)
9108
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(Del1)", "Program.Method(Del2)").WithLocation(11, 9)
9132
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(Del1)", "Program.Method(Del2)").WithLocation(11, 9)
9156
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(Del1<string>)", "Program.Method(Del2<string>)").WithLocation(11, 9)
9181
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(Del1)", "Program.Method(Del2)").WithLocation(12, 9)
9419
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("E.F(A)", "E.F(B)").WithLocation(28, 36)
10037
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(in int, int)", "Program.Method(int, in int)").WithLocation(18, 9),
10040
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(in int, int)", "Program.Method(int, in int)").WithLocation(19, 9));
10071
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(int, in int)", "Program.Method(in int, int)").WithLocation(18, 9),
10074
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(int, in int)", "Program.Method(in int, int)").WithLocation(19, 9));
10105
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(in int, int, in int)", "Program.Method(int, in int, int)").WithLocation(18, 9),
10108
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(in int, int, in int)", "Program.Method(int, in int, int)").WithLocation(19, 9));
10139
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(int, in int, int)", "Program.Method(in int, int, in int)").WithLocation(18, 9),
10142
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(int, in int, int)", "Program.Method(in int, int, in int)").WithLocation(19, 9));
10798
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(string)", "Program.M(System.Text.StringBuilder)").WithLocation(11, 9));
Semantics\RawInterpolationTests_Handler.cs (4)
3285
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(CustomHandler1)", "C.M(CustomHandler2)").WithLocation(2, 3));
4052
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Func<bool, string>)", "C.M(System.Func<bool, CustomHandler>)").WithLocation(3, 3));
4102
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Action<string>)", "C.M(System.Action<CustomHandler>)").WithLocation(3, 3));
4109
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Action<string>)", "C.M(System.Action<CustomHandler>)").WithLocation(3, 3));
Semantics\RecordStructTests.cs (2)
1872
Diagnostic(ErrorCode.
ERR_AmbigCall
, "C").WithArguments("C.C(int, int)", "C.C(int, int)").WithLocation(11, 21)
11143
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this").WithArguments("S2.S2()", "S2.S2()").WithLocation(3, 27),
Semantics\RecordTests.cs (4)
399
Diagnostic(ErrorCode.
ERR_AmbigCall
, "(y)").WithArguments("R.R(R)", "R.R(R)").WithLocation(6, 30),
405
Diagnostic(ErrorCode.
ERR_AmbigCall
, "base").WithArguments("R.R(R)", "R.R(R)").WithLocation(8, 33),
417
Diagnostic(ErrorCode.
ERR_AmbigCall
, "(y)").WithArguments("R.R(R)", "R.R(R)").WithLocation(11, 32),
941
Diagnostic(ErrorCode.
ERR_AmbigCall
, "C").WithArguments("C.C(int, int)", "C.C(int, int)").WithLocation(11, 21)
Semantics\RefExtensionMethodsTests.cs (2)
2071
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Print").WithArguments("Ext1.Print(ref int)", "Ext2.Print(in int)").WithLocation(20, 11));
2107
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Print").WithArguments("Ext1.Print(ref int)", "Ext2.Print(in int)").WithLocation(21, 15));
Semantics\RefFieldTests.cs (13)
16043
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("C.M2(D1)", "C.M2(D2)").WithLocation(13, 9),
16046
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("C.M2(D1)", "C.M2(D2)").WithLocation(14, 9),
16052
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("C.M2(D1)", "C.M2(D2)").WithLocation(15, 9)
16330
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(11, 9),
16333
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(12, 9),
16336
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(13, 18),
16339
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(14, 9),
16342
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(17, 9),
16348
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(19, 9),
16386
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(16, 9));
16425
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(18, 9));
17434
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o.F1").WithArguments("E1.F1(object, R)", "E2.F1(object, scoped R)").WithLocation(17, 18),
17437
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o.F2").WithArguments("E1.F2(object, ref R)", "E2.F2(object, scoped ref R)").WithLocation(18, 18));
Semantics\SemanticAnalyzerTests.cs (1)
467
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Ambiguous").WithArguments("P.Ambiguous(string, object)", "P.Ambiguous(object, string)").WithLocation(95, 11),
Semantics\SemanticErrorTests.cs (3)
3201
Diagnostic(ErrorCode.
ERR_AmbigCall
, "f").WithArguments("C.f(int, double)", "C.f(double, int)")
23501
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method1").WithArguments("Test.Method1(int, long)", "Test.Method1(long, int)"));
23530
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Class1").WithArguments("Class1.Class1(int, long)", "Class1.Class1(long, int)"));
Semantics\TargetTypedDefaultTests.cs (3)
893
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(int)", "C.M(string)").WithLocation(6, 9)
2363
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(params object[])", "C.M(params int[])").WithLocation(6, 9)
2385
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(params object[])", "C.M(int)").WithLocation(6, 9)
Semantics\UserDefinedConversionTests.cs (1)
1412
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("Program.Goo(B)", "Program.Goo(C)"));
Semantics\UsingStatementTests.cs (8)
170
Diagnostic(ErrorCode.
ERR_AmbigCall
, "S1 s = new S1()").WithArguments("S1.Dispose()", "S1.Dispose()").WithLocation(12, 16),
204
Diagnostic(ErrorCode.
ERR_AmbigCall
, "S1 s = new S1()").WithArguments("S1.Dispose()", "S1.Dispose()").WithLocation(12, 16),
210
Diagnostic(ErrorCode.
ERR_AmbigCall
, "s1b").WithArguments("S1.Dispose()", "S1.Dispose()").WithLocation(16, 16),
269
Diagnostic(ErrorCode.
ERR_AmbigCall
, "S1 s = new S1()").WithArguments("S1.Dispose()", "S1.Dispose()").WithLocation(12, 16),
275
Diagnostic(ErrorCode.
ERR_AmbigCall
, "s1b").WithArguments("S1.Dispose()", "S1.Dispose()").WithLocation(16, 16),
443
Diagnostic(ErrorCode.
ERR_AmbigCall
, "S1 s = new S1()").WithArguments("C2.Dispose(S1)", "C3.Dispose(S1)").WithLocation(20, 16),
580
Diagnostic(ErrorCode.
ERR_AmbigCall
, "S1 s = new S1()").WithArguments("N1.C2.Dispose(S1)", "N3.C4.Dispose(S1)").WithLocation(77, 20),
680
Diagnostic(ErrorCode.
ERR_AmbigCall
, "S1 s = new S1()").WithArguments("C2.Dispose(S1, int)", "C3.Dispose(S1, int)").WithLocation(21, 15),
Semantics\VarianceTests.cs (1)
275
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("C.Goo(D<IIn<I>>)", "C.Goo(D<I>)"));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (33)
BadSymbolReference.cs (4)
342
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test4").WithArguments("CL3_C2.Test4(CL3_C1)", "CL3_C2.Test4(CL3_C3)").WithLocation(171, 16),
541
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test4").WithArguments("CL3_C2.Test4(CL3_C1)", "CL3_C2.Test4(CL3_C3)").WithLocation(171, 16),
633
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test4").WithArguments("CL3_C2.Test4(CL3_C1)", "CL3_C2.Test4(CL3_C3)").WithLocation(171, 16),
714
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test4").WithArguments("CL3_C2.Test4(CL3_C1)", "CL3_C2.Test4(CL3_C3)").WithLocation(171, 16),
Compilation\GetSemanticInfoTests.cs (3)
5577
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(6, 9));
5662
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(System.Func<A>)", "Program.M(System.Func<B>)").WithLocation(8, 9));
5715
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Derived.M(System.Func<int, A>)", "Derived.M(System.Func<int, B>)").WithLocation(14, 9));
Compilation\UsedAssembliesTests.cs (1)
1534
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C0.M1(string, string)", "C1.M1(string, string)").WithLocation(7, 11)
Symbols\ExtensionMethodTests.cs (19)
695
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("N1.N2.C.M6(object, string)", "N1.N2.C.M6(string, object)").WithLocation(15, 22),
713
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("N1.N2.C.M6(object, string)", "N1.N2.C.M6(string, object)").WithLocation(46, 22));
756
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArguments("N1.N2.S.E(object, double, N1.A)", "N1.N2.S.E(object, double, N1.B)").WithLocation(22, 19),
1022
Diagnostic(ErrorCode.
ERR_AmbigCall
, "c.F3").WithArguments("S2.F3(N.C, object)", "S3.F3(N.C, object)").WithLocation(14, 16));
1044
Diagnostic(ErrorCode.
ERR_AmbigCall
, "c.F3").WithArguments("S2.F3(N.C, object)", "S3.F3(N.C, object)").WithLocation(14, 16));
1099
Diagnostic(ErrorCode.
ERR_AmbigCall
, "G").WithArguments("C.G(DA)", "C.G(DB)").WithLocation(11, 12),
1101
Diagnostic(ErrorCode.
ERR_AmbigCall
, "G").WithArguments("C.G(DA)", "C.G(DB)").WithLocation(12, 12),
1103
Diagnostic(ErrorCode.
ERR_AmbigCall
, "G").WithArguments("N.C.G(DA)", "N.C.G(DB)").WithLocation(29, 18),
1105
Diagnostic(ErrorCode.
ERR_AmbigCall
, "G").WithArguments("N.C.G(DA)", "N.C.G(DB)").WithLocation(30, 18));
1693
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArgumentsAnyOrder("A.E(string, int)", "B.E(string, int)").WithLocation(10, 11),
1694
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArgumentsAnyOrder("B.E(string, int)", "A.E(string, int)").WithLocation(17, 11),
1695
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArguments("N.S.A.E(string, int)", "N.S.B.E(string, int)").WithLocation(34, 15),
1696
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArguments("N.S.A.E(string, int)", "N.S.B.E(string, int)").WithLocation(41, 15));
1730
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArgumentsAnyOrder("N.C.M2(System.Action)", "N.C.M2(System.Action<int>)").WithLocation(7, 13));
2196
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArguments("N1.S.E(object)", "N2.S.E(object)").WithLocation(37, 15));
3407
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("NA.A.F(object)", "NA.B.F(object)").WithLocation(16, 26),
3584
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("N.S.Goo(int)", "N.R.Goo(int)").WithLocation(9, 11));
3671
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("N.S.Goo(int)", "N.R.Goo(int)").WithLocation(13, 15));
3705
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("N.Program.Goo(int)", "N.R.Goo(int)").WithLocation(10, 15),
Symbols\IndexerTests.cs (1)
2497
Diagnostic(ErrorCode.
ERR_AmbigCall
, "s[0, 1]").WithArguments("SameSignaturesDifferentNames.this[int, long]", "SameSignaturesDifferentNames.this[int, long]"));
Symbols\Source\FileModifierTests.cs (1)
1014
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M()", "C.M()").WithLocation(14, 11));
Symbols\Source\NullablePublicAPITests.cs (4)
3087
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o1").WithArguments("CExt1.Add<T>(C, T)", "CExt2.Add<T>(C, T)").WithLocation(10, 23),
3090
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Identity(o1 ??= new object())").WithArguments("CExt1.Add<T>(C, T)", "CExt2.Add<T>(C, T)").WithLocation(10, 27),
3093
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o1").WithArguments("CExt1.Add<T>(C, T)", "CExt2.Add<T>(C, T)").WithLocation(10, 58),
3096
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o2").WithArguments("CExt1.Add<T>(C, T)", "CExt2.Add<T>(C, T)").WithLocation(10, 62));