513 references to ERR_AmbigCall
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1520
return new DiagnosticInfoWithSymbols(ErrorCode.
ERR_AmbigCall
, arguments, symbols);
Errors\ErrorFacts.cs (1)
717
or 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)
3108
Diagnostic(ErrorCode.
ERR_AmbigCall
, "IHelpers.M").WithArguments("IHelpers.M(I1)", "IHelpers.M(I2)").WithLocation(13, 35)
3451
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(string, object)", "C.M(object, string)").WithLocation(8, 48)
4048
Diagnostic(ErrorCode.
ERR_AmbigCall
, "D").WithArguments("Program1.D(delegate*<int, void>)", "Program1.D(delegate*<long, void>)").WithLocation(11, 9)
6006
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(delegate*<I1>)", "C.M1(delegate*<I2>)").WithLocation(11, 9)
6144
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)
7720
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)
17030
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("NS2.C2.M1(string, (int, int))", "NS1.C1.M1(string, (int, int))").WithLocation(10, 13)
21190
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C1.M(string, (int, int))", "C2.M(string, (int a, int b))").WithLocation(18, 18),
21193
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C1.M(string, (int, int))", "C2.M(string, (int a, int b))").WithLocation(19, 18),
21196
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C1.M(string, (int, int))", "C2.M(string, (int a, int b))").WithLocation(20, 18)
26198
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)
4846
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("Program.M2(System.Exception)", "Program.M2(int)").WithLocation(12, 16)
CodeGen\UnsafeTests.cs (2)
4539
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new Fixable(1)").WithArguments("FixableExt.GetPinnableReference(in Fixable)", "FixableExt1.GetPinnableReference(in Fixable)").WithLocation(6, 25),
4545
Diagnostic(ErrorCode.
ERR_AmbigCall
, "f").WithArguments("FixableExt.GetPinnableReference(in Fixable)", "FixableExt1.GetPinnableReference(in Fixable)").WithLocation(12, 25),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (221)
Attributes\AttributeTests.cs (1)
5906
Diagnostic(ErrorCode.
ERR_AmbigCall
, "X(A.dyn)").WithArguments("XAttribute.XAttribute(decimal)", "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),
FirstClassSpanTests.cs (14)
63
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Join").WithArguments("StringExtensions.Join(string, params string[])", "StringExtensions.Join(string, params System.ReadOnlySpan<string>)").WithLocation(7, 65));
607
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M<T>(T[], T[])", "C.M<T>(System.ReadOnlySpan<T>, System.Span<T>)").WithLocation(5, 3)
690
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M<T>(T, T)", "C.M<T>(System.Span<T>, System.Span<T>)").WithLocation(6, 3)
720
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Collections.Generic.IEnumerable<int>, System.ReadOnlySpan<int>)", "C.M(System.Span<int>, System.Span<int>)").WithLocation(5, 3)
7402
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Span<int>)", "C.M(System.Collections.Generic.IEnumerable<int>)").WithLocation(5, 3));
7452
Diagnostic(ErrorCode.
ERR_AmbigCall
, "C").WithArguments("C.C(System.Span<int>)", "C.C(System.Collections.Generic.IEnumerable<int>)").WithLocation(5, 13));
8116
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(System.Span<string>)", "C.M1(System.ReadOnlySpan<object>)").WithLocation(1, 3)
8135
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("C.M2(System.Span<object>)", "C.M2(System.ReadOnlySpan<string>)").WithLocation(1, 3));
8238
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Span<string>)", "C.M(System.ReadOnlySpan<object>)").WithLocation(3, 3));
8360
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Span<object>)", "C.M(System.ReadOnlySpan<string>)").WithLocation(3, 3));
8532
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("E.M1(System.Span<string>)", "E.M1(System.ReadOnlySpan<object>)").WithLocation(1, 17));
8553
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.ReadOnlySpan<string>)", "C.M(System.ReadOnlySpan<object>)").WithLocation(1, 3));
8644
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(params System.ReadOnlySpan<string>)", "C.M(params System.ReadOnlySpan<object>)").WithLocation(1, 3));
8697
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(C)", "C.M(System.ReadOnlySpan<object>)").WithLocation(3, 3));
OverloadResolutionPriorityTests.cs (6)
170
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(I1)", "C.M(I2)").WithLocation(2, 3)
179
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(I1)", "C.M(I2)").WithLocation(2, 3)
220
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(I1)", "C.M(I2)").WithLocation(4, 3)
363
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C1.M(I1)", "C2.M(I2)").WithLocation(4, 4)
2753
Diagnostic(ErrorCode.
ERR_AmbigCall
, "R").WithArguments("E1.R(int)", "E2.R(int)").WithLocation(9, 11)
2815
Diagnostic(ErrorCode.
ERR_AmbigCall
, "R").WithArguments("E1.R(int)", "E2.R(int)").WithLocation(9, 11)
PartialEventsAndConstructorsTests.cs (2)
766
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this").WithArguments("C.C()", "C.C()").WithLocation(4, 19));
826
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this").WithArguments("C.C()", "C.C()").WithLocation(3, 19));
RefReadonlyParameterTests.cs (28)
3390
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(string, ref int)", "C.M1(C, ref readonly int)").WithLocation(9, 34));
3412
Diagnostic(ErrorCode.
ERR_AmbigCall
, "C").WithArguments("C.C(string, ref int)", "C.C(C, ref readonly int)").WithLocation(9, 13));
3532
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int)", "C.M1(I2, ref readonly int)").WithLocation(10, 30),
3535
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int)", "C.M1(I2, ref readonly int)").WithLocation(11, 30),
3538
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int)", "C.M1(I2, ref readonly int)").WithLocation(12, 30));
3562
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, ref int)", "C.M1(I2, ref readonly int)").WithLocation(2, 24));
3622
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int)", "C.M1(I2, ref int)").WithLocation(12, 30),
3625
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int)", "C.M1(I3, ref readonly int)").WithLocation(13, 30),
3628
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int)", "C.M1(I3, ref readonly int)").WithLocation(14, 30));
3657
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I2, in int)", "C.M1(I3, ref int)").WithLocation(2, 24),
3660
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I2, in int)", "C.M1(I4, ref readonly int)").WithLocation(3, 24));
3695
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int)", "C.M1(I2, ref int)").WithLocation(10, 30)
3732
: Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref int)", "C.M1(I2, ref int, in int)").WithLocation(3, 24),
3786
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(10, 32),
3789
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(11, 32),
3792
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(12, 32),
3795
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(13, 32),
3798
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(14, 32),
3801
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(15, 32),
3804
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(16, 32),
3807
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(17, 32),
3810
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, ref readonly int)", "C.M1(I2, ref readonly int, in int)").WithLocation(18, 32));
3842
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, in int, in int)", "C.M1(I2, in int, in int, ref int)").WithLocation(10, 38)
3869
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(I1, in int, in int, in int)", "C.M1(I2, in int, in int, in int)").WithLocation(10, 38));
3921
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("I.M(I1, ref int)", "I.M(I2, in int)").WithLocation(3, 3)
3975
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("I.M(I1, ref int)", "I.M(I2, ref readonly int)").WithLocation(3, 3));
7629
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this.M").WithArguments("C.M(I1, ref readonly int)", "C.M(I2, ref int)").WithLocation(8, 17));
7682
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this.M").WithArguments("C.M(I1, in int)", "C.M(I2, ref int)").WithLocation(8, 17)
Semantics\CollectionExpressionTests.cs (105)
785
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Collections.Generic.List<int>)", "Program.F(int[])").WithLocation(8, 17));
810
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(System.Collections.Generic.List<int>)", "Program.F1(int[])").WithLocation(10, 17),
813
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(int[])", "Program.F2(System.Collections.Generic.List<int>)").WithLocation(11, 17));
843
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(System.Collections.Generic.List<int>)", "Program.F1(System.Collections.Generic.List<long?>)").WithLocation(10, 17),
846
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(System.Collections.Generic.List<long?>)", "Program.F2(System.Collections.Generic.List<int>)").WithLocation(11, 17));
871
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(System.Collections.Generic.List<int?>)", "Program.F1(System.Collections.Generic.List<long>)").WithLocation(10, 17),
874
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(System.Collections.Generic.List<long>)", "Program.F2(System.Collections.Generic.List<int?>)").WithLocation(11, 17));
906
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(S)", "Program.F1(System.Collections.Generic.List<int>)").WithLocation(17, 17),
909
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(System.Collections.Generic.List<int>)", "Program.F2(S)").WithLocation(18, 17));
960
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(int[])", "Program.F1(string[])").WithLocation(12, 9),
963
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(System.Collections.Generic.List<int>)", "Program.F2(System.Collections.Generic.List<string>)").WithLocation(13, 9),
966
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F3").WithArguments("Program.F3(string[])", "Program.F3(System.Collections.Generic.List<int?>)").WithLocation(14, 9));
1051
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(MyCollection)", "Program.F(int?[])").WithLocation(15, 17),
1054
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(MyCollection)", "Program.F(int?[])").WithLocation(18, 17),
1057
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(MyCollection)", "Program.F(int?[])").WithLocation(20, 9),
1060
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(MyCollection)", "Program.F(int?[])").WithLocation(21, 9),
1063
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(MyCollection)", "Program.F(int?[])").WithLocation(23, 9),
1066
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(MyCollection)", "Program.F(int?[])").WithLocation(24, 9)
1138
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(MyCollection1)", "Program.F(MyCollection2)").WithLocation(24, 17),
1141
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(MyCollection1)", "Program.F(MyCollection2)").WithLocation(26, 17)
1450
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(generateMethodSignature("F1", type1), generateMethodSignature("F1", type2)).WithLocation(10, 17),
1453
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(generateMethodSignature("F2", type2), generateMethodSignature("F2", type1)).WithLocation(12, 17));
1545
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(generateMethodSignature("F1", type1), generateMethodSignature("F1", type2)).WithLocation(10, 17),
1548
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(generateMethodSignature("F2", type2), generateMethodSignature("F2", type1)).WithLocation(12, 17));
1645
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(generateMethodSignature("F1", type1), generateMethodSignature("F1", type2)).WithLocation(10, 17),
1648
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(generateMethodSignature("F2", type2), generateMethodSignature("F2", type1)).WithLocation(12, 17));
1751
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(generateMethodSignature("F1", type1), generateMethodSignature("F1", type2)).WithLocation(10, 17),
1754
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(generateMethodSignature("F2", type2), generateMethodSignature("F2", type1)).WithLocation(12, 17),
1757
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(generateMethodSignature("F1", type1), generateMethodSignature("F1", type2)).WithLocation(14, 17),
1760
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(generateMethodSignature("F2", type2), generateMethodSignature("F2", type1)).WithLocation(16, 17));
1824
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(f1StringSig, f1InterpolatedSig).WithLocation(1, 9),
1827
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(f2InterpolatedSig, f2StringSig).WithLocation(2, 9),
1830
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(f1StringSig, f1InterpolatedSig).WithLocation(3, 9),
1833
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(f2InterpolatedSig, f2StringSig).WithLocation(4, 9)
1941
Diagnostic(ErrorCode.
ERR_AmbigCall
, "ArrayDerived").WithArguments("Program.ArrayDerived(System.Span<object>)", "Program.ArrayDerived(string[])").WithLocation(12, 9)
1956
var expectedDiagnostic = Diagnostic(ErrorCode.
ERR_AmbigCall
, "SpanDerived").WithArguments("Program.SpanDerived(System.Span<string>)", "Program.SpanDerived(object[])").WithLocation(5, 9);
2039
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Unrelated").WithArguments("Program.Unrelated(System.Span<int>)", "Program.Unrelated(string[])").WithLocation(6, 9));
2069
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(int[], int[])", "Program.F1(System.Span<object>, System.ReadOnlySpan<int>)").WithLocation(10, 9),
2072
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(object, string[])", "Program.F2(string, System.Span<object>)").WithLocation(11, 9)
2111
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(System.Span<int>, int[])", "Program.F1(int[], System.ReadOnlySpan<int>)").WithLocation(10, 9),
2114
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(string, string[])", "Program.F2(object, System.Span<string>)").WithLocation(11, 9));
2219
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(System.ReadOnlySpan<int>)", "Program.F1(System.ReadOnlySpan<object>)").WithLocation(10, 9),
2222
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(System.Span<string>)", "Program.F2(System.Span<object>)").WithLocation(11, 9));
2247
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments("Program.F1(int[])", "Program.F1(object[])").WithLocation(8, 9));
2312
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(System.Collections.Generic.List<int>)", "Program.F2(System.Collections.Generic.List<byte>)").WithLocation(9, 9));
2339
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(System.Collections.Generic.List<int>)", "Program.F2(System.Collections.Generic.List<byte>)").WithLocation(9, 9));
2377
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(System.ReadOnlySpan<string>)", $"Program.F2(System.ReadOnlySpan<{formatType}>)").WithLocation(8, 9)
2547
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(6, 3),
2550
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(7, 3),
2553
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(8, 3),
2556
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(9, 3),
2559
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(13, 3),
2562
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(14, 3),
2565
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(15, 3),
2568
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(16, 3),
2571
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(17, 3),
2574
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(18, 3),
2577
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(19, 3),
2580
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ext1.M1(object, System.Collections.Generic.List<dynamic>)", "Ext2.M1(object, System.Collections.Generic.List<object>)").WithLocation(20, 3)
2722
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(6, 1),
2725
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(7, 1),
2728
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(8, 1),
2731
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(9, 1),
2734
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments(generateMethodSignature("M2", listType),generateMethodSignature("M2", hashSetType)).WithLocation(10, 1),
2737
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments(generateMethodSignature("M2", listType),generateMethodSignature("M2", hashSetType)).WithLocation(11, 1),
2740
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments(generateMethodSignature("M2", listType),generateMethodSignature("M2", hashSetType)).WithLocation(12, 1),
2743
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments(generateMethodSignature("M2", listType),generateMethodSignature("M2", hashSetType)).WithLocation(13, 1),
2746
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(17, 1),
2749
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(18, 1),
2752
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(19, 1),
2755
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(20, 1),
2758
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(21, 1),
2761
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(22, 1),
2764
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(23, 1),
2767
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments(generateMethodSignature("M1", hashSetType), generateMethodSignature("M1", listType)).WithLocation(24, 1)
2900
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(6, 3),
2903
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(7, 3),
2906
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(8, 3),
2909
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(9, 3),
2912
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(13, 3),
2915
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(14, 3),
2918
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(15, 3),
2921
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(16, 3),
2924
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(17, 3),
2927
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(18, 3),
2930
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(19, 3),
2933
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Ex1.M1(object, System.Collections.Generic.List<(int a, int b)>)", "Ex2.M1(object, System.Collections.Generic.List<(int c, int d)>)").WithLocation(20, 3)
3000
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments($"Program.M1(params System.Collections.Generic.{type1})", $"Program.M1(params System.Collections.Generic.{type2})").WithLocation(4, 1),
3003
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments($"Program.M1(params System.Collections.Generic.{type1})", $"Program.M1(params System.Collections.Generic.{type2})").WithLocation(5, 1),
3006
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments($"Program.M1(params System.Collections.Generic.{type1})", $"Program.M1(params System.Collections.Generic.{type2})").WithLocation(6, 1),
3009
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments($"Program.M1(params System.Collections.Generic.{type1})", $"Program.M1(params System.Collections.Generic.{type2})").WithLocation(7, 1)
3561
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F<T>(T[])", "Program.F<T>(System.Collections.Generic.List<T>)").WithLocation(8, 13));
7013
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new AB()").WithArguments("C.Add(IA)", "C.Add(IB)").WithLocation(15, 36));
7045
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new AB()").WithArguments("Extensions.Add(C, IA)", "Extensions.Add(C, IB)").WithLocation(18, 36));
27266
Diagnostic(ErrorCode.
ERR_AmbigCall
, "x").WithArguments("MyCollection.Add(IA)", "MyCollection.Add(IB)").WithLocation(6, 27),
27269
Diagnostic(ErrorCode.
ERR_AmbigCall
, "y").WithArguments("MyCollection.Add(IA)", "MyCollection.Add(IB)").WithLocation(6, 32));
27344
Diagnostic(ErrorCode.
ERR_AmbigCall
, "x").WithArguments("MyCollection.Add(IA)", "MyCollection.Add(IB)").WithLocation(6, 27),
27347
Diagnostic(ErrorCode.
ERR_AmbigCall
, "y").WithArguments("MyCollection.Add(IA)", "MyCollection.Add(IB)").WithLocation(6, 32));
27431
Diagnostic(ErrorCode.
ERR_AmbigCall
, "x").WithArguments("ExtensionsA.Add<T>(MyCollection<T>, string)", "ExtensionsB.Add<T>(MyCollection<T>, string)").WithLocation(6, 27),
27434
Diagnostic(ErrorCode.
ERR_AmbigCall
, "y").WithArguments("ExtensionsA.Add<T>(MyCollection<T>, string)", "ExtensionsB.Add<T>(MyCollection<T>, string)").WithLocation(6, 32));
28713
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(C)", "C.M(int[])").WithLocation(5, 3),
28716
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(C)", "C.M(int[])").WithLocation(6, 3));
29448
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.ReadOnlySpan<int>)", "C.M(System.Collections.Generic.List<int>)").WithLocation(4, 3));
29884
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new C()").WithArguments("Collection.Add(I1)", "Collection.Add(I2)").WithLocation(4, 17));
29913
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new C()").WithArguments("Collection.Add(I1)", "Collection.Add(I2)").WithLocation(4, 17)
Semantics\ExpressionOptionalAndNamedArgumentsTests.cs (2)
1627
Diagnostic(ErrorCode.
ERR_AmbigCall
, "GetFirst").WithArguments("A.GetFirst(int, int)", "A.GetFirst(string, string)").WithLocation(5, 30),
1630
Diagnostic(ErrorCode.
ERR_AmbigCall
, "GetFirst").WithArguments("A.GetFirst(int, int)", "A.GetFirst(string, string)").WithLocation(6, 30));
Semantics\ExtensionOperatorsTests.cs (14)
5858
Diagnostic(ErrorCode.
ERR_AmbigCall
, "--").WithArguments("I1.operator --()", "I3.operator --()").WithLocation(33, 17)
5923
Diagnostic(ErrorCode.
ERR_AmbigCall
, "--").WithArguments("I1.operator --()", "I3.operator --()").WithLocation(33, 17)
6061
Diagnostic(ErrorCode.
ERR_AmbigCall
, "--").WithArguments("NS1.Extensions2.extension(I1).operator --()", "NS1.Extensions2.extension(I3).operator --()").WithLocation(35, 21)
6135
Diagnostic(ErrorCode.
ERR_AmbigCall
, "--").WithArguments("NS1.Extensions2.extension(I1).operator --()", "NS1.Extensions2.extension(I3).operator --()").WithLocation(35, 21)
7672
Diagnostic(ErrorCode.
ERR_AmbigCall
, "--").WithArguments("Extensions2.extension(C1).operator --()", "Extensions1.extension(C1).operator --()").WithLocation(32, 13),
7675
Diagnostic(ErrorCode.
ERR_AmbigCall
, "--").WithArguments("Extensions1.extension(C1).operator checked --()", "Extensions2.extension(C1).operator --()").WithLocation(36, 17)
10378
Diagnostic(ErrorCode.
ERR_AmbigCall
, "++").WithArguments("Extensions2.extension(ref S2).operator ++()", "Extensions1.extension(ref S2).operator ++()").WithLocation(26, 9)
21346
Diagnostic(ErrorCode.
ERR_AmbigCall
, "-=").WithArguments("I1.operator -=(I1)", "I3.operator -=(I3)").WithLocation(33, 19)
21411
Diagnostic(ErrorCode.
ERR_AmbigCall
, "-=").WithArguments("I1.operator -=(I1)", "I3.operator -=(I3)").WithLocation(33, 19)
21549
Diagnostic(ErrorCode.
ERR_AmbigCall
, "-=").WithArguments("NS1.Extensions2.extension(I1).operator -=(I1)", "NS1.Extensions2.extension(I3).operator -=(I3)").WithLocation(35, 23)
21623
Diagnostic(ErrorCode.
ERR_AmbigCall
, "-=").WithArguments("NS1.Extensions2.extension(I1).operator -=(I1)", "NS1.Extensions2.extension(I3).operator -=(I3)").WithLocation(35, 23)
23670
Diagnostic(ErrorCode.
ERR_AmbigCall
, "-=").WithArguments("Extensions2.extension(C1).operator -=(C1)", "Extensions1.extension(C1).operator -=(C1)").WithLocation(35, 16),
23673
Diagnostic(ErrorCode.
ERR_AmbigCall
, "-=").WithArguments("Extensions1.extension(C1).operator checked -=(C1)", "Extensions2.extension(C1).operator -=(C1)").WithLocation(39, 20)
27173
Diagnostic(ErrorCode.
ERR_AmbigCall
, "+=").WithArguments("Extensions1.extension(ref S2).operator +=(C1)", "Extensions1.extension(ref S2).operator +=(C2)").WithLocation(29, 12)
Semantics\ExtensionTests.cs (20)
11860
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("E2.extension(object).Method()", "E1.extension(object).Method()").WithLocation(1, 14));
11867
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("E1.extension(object).Method()", "E2.extension(object).Method()").WithLocation(1, 14));
13244
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E1.extension(C).M(int)", "E2.M(C, int)").WithLocation(1, 9));
13277
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E.extension(C).M(int)", "E.M(C, int)").WithLocation(1, 9),
14378
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E2.extension(object).M()", "E1.extension(object).M()").WithLocation(1, 14));
14385
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E1.extension(object).M()", "E2.extension(object).M()").WithLocation(1, 14));
15405
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("E2.extension(object).Method()", "E1.extension(object).Method()").WithLocation(1, 8));
15412
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("E1.extension(object).Method()", "E2.extension(object).Method()").WithLocation(1, 8));
21063
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("I<T>.M()", "I<T>.M()").WithLocation(1, 4));
21083
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M<int>").WithArguments("I<T>.M<U>()", "I<T>.M<U>()").WithLocation(1, 4));
24844
Diagnostic(ErrorCode.
ERR_AmbigCall
, "C.M").WithArguments("E.extension(C).M(string, object)", "E.extension(C).M(object, string)").WithLocation(5, 48));
28054
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("Extensions.extension(int).M2()", "Extensions.M2(ref int)").WithLocation(5, 11)
28182
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("Extensions.extension(int).M2()", "Extensions.M2(ref int)").WithLocation(5, 11)
29244
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E1.extension(object).M()", "E2.M(object)").WithLocation(1, 14));
30244
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E.extension(object).M(string)", "E.extension(string).M(object)").WithLocation(1, 4));
30460
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E1.extension(int).M<T>(T)", "E2.extension<T>(T).M(int)").WithLocation(1, 5));
33469
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E1.extension<T>(T).M()", "E2.extension<T>(T).M()").WithLocation(1, 8));
35267
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Color.M").WithArguments("E1.extension<T>(T).M()", "E2.extension<T>(T).M()").WithLocation(5, 17));
42720
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E.extension(object).M(string)", "E.extension(string).M(object)").WithLocation(2, 4)
42764
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("E.extension(object).M(string)", "E.extension(string).M(object)").WithLocation(3, 3)
Semantics\OutVarTests.cs (3)
19465
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test1").WithArguments("Cls.Test1(out int, object)", "Cls.Test1(out short, object)").WithLocation(6, 9)
33448
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(out object)", "C.M(out int)").WithLocation(8, 9),
33451
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(out object)", "C.M(out int)").WithLocation(9, 9),
Semantics\ParamsCollectionTests.cs (18)
5084
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(generateMethodSignature("F1", type1), generateMethodSignature("F1", type2)).WithLocation(10, 17),
5087
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(generateMethodSignature("F2", type2), generateMethodSignature("F2", type1)).WithLocation(12, 17));
5194
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(generateMethodSignature("F1", type1), generateMethodSignature("F1", type2)).WithLocation(10, 17),
5197
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(generateMethodSignature("F2", type2), generateMethodSignature("F2", type1)).WithLocation(12, 17));
5299
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(generateMethodSignature("F1", type1), generateMethodSignature("F1", type2)).WithLocation(10, 17),
5302
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(generateMethodSignature("F2", type2), generateMethodSignature("F2", type1)).WithLocation(12, 17));
5366
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(f1StringSig, f1InterpolatedSig).WithLocation(1, 9),
5369
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(f2InterpolatedSig, f2StringSig).WithLocation(2, 9),
5372
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F1").WithArguments(f1StringSig, f1InterpolatedSig).WithLocation(3, 9),
5375
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments(f2InterpolatedSig, f2StringSig).WithLocation(4, 9)
5527
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Unrelated").WithArguments("Program.Unrelated(params System.Span<int>)", "Program.Unrelated(params string[])").WithLocation(6, 9)
5556
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(object, params string[])", "Program.F2(string, params System.Span<object>)").WithLocation(11, 9)
5767
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F2").WithArguments("Program.F2(params System.Collections.Generic.List<int>)", "Program.F2(params System.Collections.Generic.List<byte>)").WithLocation(9, 9));
6160
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test").WithArguments("Program.Test(int, params System.ReadOnlySpan<int>)", "Program.Test(int, params System.Span<int>)").WithLocation(5, 9)
6190
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test").WithArguments("Program.Test(long, params System.ReadOnlySpan<int>)", "Program.Test(int, params long[])").WithLocation(5, 9)
6233
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Add").WithArguments("ExtensionsA.Add<T>(MyCollection<T>, params string[])", "ExtensionsB.Add<T>(MyCollection<T>, params string[])").WithLocation(25, 11),
6236
Diagnostic(ErrorCode.
ERR_AmbigCall
, @"""""").WithArguments("ExtensionsA.Add<T>(MyCollection<T>, params string[])", "ExtensionsB.Add<T>(MyCollection<T>, params string[])").WithLocation(27, 44)
15199
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test").WithArguments("Program.Test(params MyCollection1)", "Program.Test(MyCollection2)").WithLocation(45, 9),
Semantics\PatternMatchingTests4.cs (2)
2002
Diagnostic(ErrorCode.
ERR_AmbigCall
, "(x, y)").WithArguments("I1.Deconstruct(out int, out int)", "I2.Deconstruct(out int, out int)").WithLocation(8, 22)
2048
Diagnostic(ErrorCode.
ERR_AmbigCall
, "(var x, var y)").WithArguments("I1.Deconstruct(out int, out int)", "I2.Deconstruct(out int, out int)").WithLocation(8, 18)
Semantics\RecordTests.cs (1)
931
Diagnostic(ErrorCode.
ERR_AmbigCall
, "C").WithArguments("C.C(int, int)", "C.C(int, int)").WithLocation(11, 21)
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (2)
5017
Diagnostic(ErrorCode.
ERR_AmbigCall
, "++").WithArguments("I1.operator ++()", "I2<T>.operator ++()").WithLocation(18, 9)
16446
Diagnostic(ErrorCode.
ERR_AmbigCall
, "+=").WithArguments("I1.operator +=(int)", "I2<T>.operator +=(int)").WithLocation(18, 11)
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 (234)
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)
1055
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(6, 17),
1058
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(7, 11),
1061
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(8, 9),
1064
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(13, 9),
1067
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(14, 17)
1072
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(C)").WithLocation(6, 17),
1075
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(B)", "Program.M(D)").WithLocation(7, 11),
1078
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(C)").WithLocation(8, 9),
1081
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(13, 9),
1084
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(A)", "Program.M(B)").WithLocation(14, 17)
1156
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, A)", "Program.M<T>(T, B)").WithLocation(5, 9)
1161
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, B)", "Program.M<T>(T, D)").WithLocation(5, 9)
1204
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Extensions.M<T>(T, A)", "Extensions.M<T>(T, B)").WithLocation(5, 11)
1209
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Extensions.M<T>(T, B)", "Extensions.M<T>(T, D)").WithLocation(5, 11)
1257
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Argument").WithArguments("Program.Argument(IQ)", "Program.Argument(IW)").WithLocation(5, 17)
1262
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)
398
Diagnostic(ErrorCode.
ERR_AmbigCall
, "GetAwaiter").WithArguments("Test.GetAwaiter(A)", "E.GetAwaiter(A)"),
401
Diagnostic(ErrorCode.
ERR_AmbigCall
, "GetAwaiter").WithArguments("Test.GetAwaiter(B)", "E.GetAwaiter(B)"),
404
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("Test.GetAwaiter(A)", "E.GetAwaiter(A)"),
407
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new B()").WithArguments("Test.GetAwaiter(B)", "E.GetAwaiter(B)")
459
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E.GetAwaiter(I1)", "E.GetAwaiter(I2)")
619
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("Test.GetAwaiter(A)", "E.GetAwaiter(A)"));
739
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E1.GetAwaiter(A)", "E2.GetAwaiter(A)")
786
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E1.GetAwaiter(A)", "E2.GetAwaiter(A)")
863
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("Test.GetAwaiter(object)", "EE.GetAwaiter(object)")
906
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("Test.GetAwaiter(object)", "EE.GetAwaiter(object)")
1138
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E1.GetAwaiter(A)", "E2.GetAwaiter(A)")
1189
Diagnostic(ErrorCode.
ERR_AmbigCall
, "await new A()").WithArguments("E1.GetAwaiter(A)", "E2.GetAwaiter(A)")
Semantics\BindingTests.cs (3)
359
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("A.F(object, string)", "A.F(string, object)").WithLocation(18, 11),
613
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("S.M(double, A)", "S.M(double, B)").WithLocation(12, 11),
692
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 (23)
1269
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this.F<object>").WithArguments("A.F<T>(T)", "B.F<T>(T)").WithLocation(5, 29)
1276
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this.F<object>").WithArguments("A.F<T>(T)", "B.F<T>(T)").WithLocation(5, 29)
2126
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new C().M").WithArguments("E1.M(C)", "E2.M(C)").WithLocation(3, 19),
2139
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new C().M").WithArguments("E1.M(C)", "E2.M(C)").WithLocation(3, 19),
2142
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new C().M").WithArguments("E1.M(C)", "E2.M(C)").WithLocation(4, 9)
4119
Diagnostic(ErrorCode.
ERR_AmbigCall
, "new S().F").WithArguments("E1.F(S)", "E2.F(S)").WithLocation(8, 22));
5386
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),
5389
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),
5392
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)
5419
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F<T>(System.Action<T>)", "Program.F(StringAction)").WithLocation(8, 9)
5482
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F<T>(System.Action<T>)", "Program.F<T>(MyAction<T>)").WithLocation(9, 9),
5517
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Action<string>)", "Program.F(StringAction)").WithLocation(10, 9),
5520
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Action<string>)", "Program.F(StringAction)").WithLocation(11, 9)
5804
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, System.Func<object>)", "Program.M<T>(System.Func<object>, T)").WithLocation(9, 9),
5807
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M<T>(T, System.Func<object>)", "Program.M<T>(System.Func<object>, T)").WithLocation(10, 9)
6076
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(System.Delegate, System.Delegate, string)", "Program.F(System.Func<int>, System.Delegate, MyString)").WithLocation(12, 9)
6177
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Linq.Expressions.Expression)", "C.M(System.Delegate)").WithLocation(10, 9),
6180
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Linq.Expressions.Expression)", "C.M(System.Delegate)").WithLocation(11, 9)
6375
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)
6483
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(Program.D1)", "Program.F(Program.D2)").WithLocation(9, 17));
6528
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Program.F(Program.D1)", "Program.F(Program.D2)").WithLocation(11, 17));
19035
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(Del)", "C.M(System.Action<decimal>)").WithLocation(1, 9)
19228
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)
5076
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(CustomHandler1)", "C.M(CustomHandler2)").WithLocation(2, 3)
5827
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Func<bool, string>)", "C.M(System.Func<bool, CustomHandler>)").WithLocation(3, 3)
5861
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Action<string>)", "C.M(System.Action<CustomHandler>)").WithLocation(3, 3)
Semantics\LambdaTests.cs (5)
284
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("C.Goo(System.Func<System.IComparable<I>>)", "C.Goo(System.Func<I>)").WithLocation(12, 9));
4900
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(D1)", "C.M(D2)").WithLocation(3, 9),
4903
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(D1)", "C.M(D2)").WithLocation(4, 9));
8334
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(D)", "C.M(System.Func<int[], int>)").WithLocation(3, 9),
8337
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(D)", "C.M(System.Func<int[], int>)").WithLocation(4, 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)
2757
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\OverloadResolutionPerfTests.cs (2)
44
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("C.F(C0)", "C.F(C1)").WithLocation(3, 23));
926
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("E0.F(object, C0, System.Action<C0>)", "E1.F(object, C1, System.Action<C1>)").WithLocation(6, 11),
Semantics\OverloadResolutionTests.cs (79)
161
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("P.M(string, System.Action<string>)", "P.M(object, System.Action<object>)"),
164
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(string, System.Func<object>)", "P.M1(object, System.Func<System.ValueType>)"),
167
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>)"),
170
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("P.M6(System.Action<object>, string, object)", "P.M6(System.Action<string>, object, string)")
342
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(P.DA)", "P.M1(P.DB)")
393
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(P.DA, object)", "P.M1(P.DB, int)").WithLocation(15, 5));
441
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(CA)", "P.M1(CB)")
481
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(System.Threading.Tasks.Task<int>, uint)", "P.M1(System.Threading.Tasks.Task<uint>, int)")
520
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)
569
Diagnostic(ErrorCode.
ERR_AmbigCall
, "k").WithArguments("C.k<T>(System.Func<YourTask<T>>)", "C.k<T>(System.Func<MyTask<T>>)").WithLocation(9, 9)
1168
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("P.M1(System.Func<int>, uint)", "P.M1(System.Func<uint>, int)"),
1171
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("P.M2(System.Func<int>, uint)", "P.M2(System.Action, int)")
1380
Diagnostic(ErrorCode.
ERR_AmbigCall
, "X").WithArguments("C.X(params string[])", "C.X<T>(T)").WithLocation(9, 9)
3757
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("IRef1.M5(ref int)", "IRef1.M5(ref long)"),
3760
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("IRef1.M5(ref int)", "IRef1.M5(ref long)"),
3763
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("IRef1.M5(ref int)", "IRef1.M5(ref long)"),
3766
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M5").WithArguments("IRef1.M5(ref int)", "IRef1.M5(ref long)"),
3772
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref char)", "IRef1.M6(ref long)"),
3775
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref char)", "IRef1.M6(ref long)"),
5183
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[10]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5186
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[10]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5189
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4['c']").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5192
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4['c']").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5195
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[i]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5198
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[i]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5201
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[c]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5204
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P4[c]").WithArguments("IA.P4[ref long]", "IA.P4[ref int]"),
5213
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P5['c']").WithArguments("IA.P5[ref long]", "IA.P5[ref char]"),
5216
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P5['c']").WithArguments("IA.P5[ref long]", "IA.P5[ref char]"),
5219
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P5[c]").WithArguments("IA.P5[ref long]", "IA.P5[ref char]"),
5222
Diagnostic(ErrorCode.
ERR_AmbigCall
, "a.P5[c]").WithArguments("IA.P5[ref long]", "IA.P5[ref char]"),
6035
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("IRef1.M4(ref int, long)", "IRef1.M4(ref int, ref int)"),
6038
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("IRef1.M4(ref int, long)", "IRef1.M4(ref int, ref int)"),
6050
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("IRef1.M4(ref int, long)", "IRef1.M4(ref int, ref int)"),
6053
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M4").WithArguments("IRef1.M4(ref int, long)", "IRef1.M4(ref int, ref int)"),
6098
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref int, int)", "IRef1.M6(ref long, int)"),
6104
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref int, int)", "IRef1.M6(ref long, int)"),
6113
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref int, int)", "IRef1.M6(ref long, int)"),
6119
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("IRef1.M6(ref int, int)", "IRef1.M6(ref long, int)"),
6131
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M7").WithArguments("IRef1.M7(ref int, long)", "IRef1.M7(ref long, ref int)"),
6134
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M7").WithArguments("IRef1.M7(ref int, long)", "IRef1.M7(ref long, ref int)"),
6140
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M7").WithArguments("IRef1.M7(ref int, long)", "IRef1.M7(ref long, ref int)"),
6143
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M7").WithArguments("IRef1.M7(ref int, long)", "IRef1.M7(ref long, ref int)"),
6164
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M8").WithArguments("IRef1.M8(long, ref int)", "IRef1.M8(ref long, int)"),
6167
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M8").WithArguments("IRef1.M8(long, ref int)", "IRef1.M8(ref long, int)"),
6176
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M8").WithArguments("IRef1.M8(long, ref int)", "IRef1.M8(ref long, int)"),
6224
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M9").WithArguments("IRef1.M9(ref long, ref int)", "IRef1.M9(ref int, ref long)"),
6227
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M9").WithArguments("IRef1.M9(ref long, ref int)", "IRef1.M9(ref int, ref long)"),
6233
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M9").WithArguments("IRef1.M9(ref long, ref int)", "IRef1.M9(ref int, ref long)"),
6236
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M9").WithArguments("IRef1.M9(ref long, ref int)", "IRef1.M9(ref int, ref long)"),
6489
Diagnostic(ErrorCode.
ERR_AmbigCall
, "overload1").WithArguments("Ambig.overload1(byte, goo)", "Ambig.overload1(int, baz)").WithLocation(6, 9),
6492
Diagnostic(ErrorCode.
ERR_AmbigCall
, "overload2").WithArguments("Ambig.overload2(int, baz)", "Ambig.overload2(byte, goo)").WithLocation(7, 9)
6567
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("Ambig.F(P1)", "Ambig.F(P2)"));
7084
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("Test.Goo(Test.nongenerics, dynamic)", "Test.Goo<T>(Test.generics<T>, dynamic)")
7619
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M<T>(System.Func<bool, T>)", "C.M<T>(System.Func<byte, T>)").WithLocation(8, 44),
7835
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test").WithArguments("A.B.X.Test(int)", "A.C.X.Test(int)").WithLocation(30, 19)
7915
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)
7995
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)
8037
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)
8079
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)
8119
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)
8632
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test2").WithArguments("VS2015CompilerBug.VS2015CompilerBug.Test2(int, int)", "VS2015CompilerBug.VS2015CompilerBug.Test2(int, int, int)").WithLocation(9, 39),
8635
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Test3").WithArguments("VS2015CompilerBug.VS2015CompilerBug.Test3(int, int, int, int)", "VS2015CompilerBug.VS2015CompilerBug.Test3(int, int, int)").WithLocation(10, 39)
8693
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("Test.M1(object, object, string)", "Test.M1(string, object, object)").WithLocation(14, 9)
8973
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)
9102
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(Del1)", "Program.Method(Del2)").WithLocation(11, 9)
9126
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(Del1)", "Program.Method(Del2)").WithLocation(11, 9)
9150
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(Del1<string>)", "Program.Method(Del2<string>)").WithLocation(11, 9)
9175
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(Del1)", "Program.Method(Del2)").WithLocation(12, 9)
9413
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("E.F(A)", "E.F(B)").WithLocation(28, 36)
10464
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(in int, int)", "Program.Method(int, in int)").WithLocation(18, 9),
10467
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(in int, int)", "Program.Method(int, in int)").WithLocation(19, 9));
10498
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(int, in int)", "Program.Method(in int, int)").WithLocation(18, 9),
10501
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(int, in int)", "Program.Method(in int, int)").WithLocation(19, 9));
10532
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(in int, int, in int)", "Program.Method(int, in int, int)").WithLocation(18, 9),
10535
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(in int, int, in int)", "Program.Method(int, in int, int)").WithLocation(19, 9));
10566
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(int, in int, int)", "Program.Method(in int, int, in int)").WithLocation(18, 9),
10569
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method").WithArguments("Program.Method(int, in int, int)", "Program.Method(in int, int, in int)").WithLocation(19, 9));
11225
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(string)", "Program.M(System.Text.StringBuilder)").WithLocation(11, 9));
Semantics\RawInterpolationTests_Handler.cs (4)
3287
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(CustomHandler1)", "C.M(CustomHandler2)").WithLocation(2, 3));
4056
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Func<bool, string>)", "C.M(System.Func<bool, CustomHandler>)").WithLocation(3, 3));
4106
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Action<string>)", "C.M(System.Action<CustomHandler>)").WithLocation(3, 3));
4113
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M(System.Action<string>)", "C.M(System.Action<CustomHandler>)").WithLocation(3, 3));
Semantics\RecordStructTests.cs (2)
1944
Diagnostic(ErrorCode.
ERR_AmbigCall
, "C").WithArguments("C.C(int, int)", "C.C(int, int)").WithLocation(11, 21)
11213
Diagnostic(ErrorCode.
ERR_AmbigCall
, "this").WithArguments("S2.S2()", "S2.S2()").WithLocation(3, 27),
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)
16603
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("C.M2(D1)", "C.M2(D2)").WithLocation(13, 9),
16606
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("C.M2(D1)", "C.M2(D2)").WithLocation(14, 9),
16612
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArguments("C.M2(D1)", "C.M2(D2)").WithLocation(15, 9)
16887
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(11, 9),
16890
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(12, 9),
16893
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(13, 18),
16896
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(14, 9),
16899
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(17, 9),
16905
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(19, 9),
16943
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(16, 9));
16982
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("Program.M(D1)", "Program.M(D2)").WithLocation(18, 9));
18049
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o.F1").WithArguments("E1.F1(object, R)", "E2.F1(object, scoped R)").WithLocation(17, 18),
18052
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)
3199
Diagnostic(ErrorCode.
ERR_AmbigCall
, "f").WithArguments("C.f(int, double)", "C.f(double, int)")
23757
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Method1").WithArguments("Test.Method1(int, long)", "Test.Method1(long, int)"));
23786
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Class1").WithArguments("Class1.Class1(int, long)", "Class1.Class1(long, int)"));
Semantics\SimpleLambdaParametersWithModifiersTests.cs (1)
569
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M1").WithArguments("C.M1(D)", "C.M1(E)").WithLocation(8, 9));
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)
1414
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("Program.Goo(B)", "Program.Goo(C)"));
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)
693
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("N1.N2.C.M6(object, string)", "N1.N2.C.M6(string, object)").WithLocation(15, 22),
711
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M6").WithArguments("N1.N2.C.M6(object, string)", "N1.N2.C.M6(string, object)").WithLocation(46, 22));
754
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),
1018
Diagnostic(ErrorCode.
ERR_AmbigCall
, "c.F3").WithArguments("S2.F3(N.C, object)", "S3.F3(N.C, object)").WithLocation(14, 16));
1040
Diagnostic(ErrorCode.
ERR_AmbigCall
, "c.F3").WithArguments("S2.F3(N.C, object)", "S3.F3(N.C, object)").WithLocation(14, 16));
1095
Diagnostic(ErrorCode.
ERR_AmbigCall
, "G").WithArguments("C.G(DA)", "C.G(DB)").WithLocation(11, 12),
1097
Diagnostic(ErrorCode.
ERR_AmbigCall
, "G").WithArguments("C.G(DA)", "C.G(DB)").WithLocation(12, 12),
1099
Diagnostic(ErrorCode.
ERR_AmbigCall
, "G").WithArguments("N.C.G(DA)", "N.C.G(DB)").WithLocation(29, 18),
1101
Diagnostic(ErrorCode.
ERR_AmbigCall
, "G").WithArguments("N.C.G(DA)", "N.C.G(DB)").WithLocation(30, 18));
1689
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArgumentsAnyOrder("A.E(string, int)", "B.E(string, int)").WithLocation(10, 11),
1690
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArgumentsAnyOrder("B.E(string, int)", "A.E(string, int)").WithLocation(17, 11),
1691
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArguments("N.S.A.E(string, int)", "N.S.B.E(string, int)").WithLocation(34, 15),
1692
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArguments("N.S.A.E(string, int)", "N.S.B.E(string, int)").WithLocation(41, 15));
1726
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M2").WithArgumentsAnyOrder("N.C.M2(System.Action)", "N.C.M2(System.Action<int>)").WithLocation(7, 13));
2191
Diagnostic(ErrorCode.
ERR_AmbigCall
, "E").WithArguments("N1.S.E(object)", "N2.S.E(object)").WithLocation(37, 15));
3401
Diagnostic(ErrorCode.
ERR_AmbigCall
, "F").WithArguments("NA.A.F(object)", "NA.B.F(object)").WithLocation(16, 26),
3578
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("N.S.Goo(int)", "N.R.Goo(int)").WithLocation(9, 11));
3665
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("N.S.Goo(int)", "N.R.Goo(int)").WithLocation(13, 15));
3699
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Goo").WithArguments("N.Program.Goo(int)", "N.R.Goo(int)").WithLocation(10, 15),
Symbols\IndexerTests.cs (1)
2499
Diagnostic(ErrorCode.
ERR_AmbigCall
, "s[0, 1]").WithArguments("SameSignaturesDifferentNames.this[int, long]", "SameSignaturesDifferentNames.this[int, long]"));
Symbols\Source\FileModifierTests.cs (1)
1295
Diagnostic(ErrorCode.
ERR_AmbigCall
, "M").WithArguments("C.M()", "C.M()").WithLocation(14, 11));
Symbols\Source\NullablePublicAPITests.cs (4)
3086
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o1").WithArguments("CExt1.Add<T>(C, T)", "CExt2.Add<T>(C, T)").WithLocation(10, 23),
3089
Diagnostic(ErrorCode.
ERR_AmbigCall
, "Identity(o1 ??= new object())").WithArguments("CExt1.Add<T>(C, T)", "CExt2.Add<T>(C, T)").WithLocation(10, 27),
3092
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o1").WithArguments("CExt1.Add<T>(C, T)", "CExt2.Add<T>(C, T)").WithLocation(10, 58),
3095
Diagnostic(ErrorCode.
ERR_AmbigCall
, "o2").WithArguments("CExt1.Add<T>(C, T)", "CExt2.Add<T>(C, T)").WithLocation(10, 62));