64 references to ERR_AmbigOperator
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.OperatorResolutionForReporting.cs (1)
228
Error(diagnostics, ErrorCode.
ERR_AmbigOperator
, nodeToReport(node), first, second);
Errors\ErrorFacts.cs (1)
2549
or ErrorCode.
ERR_AmbigOperator
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (43)
OverloadResolutionPriorityTests.cs (1)
2011
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("C1.operator +(C1, C2)", "C2.operator +(C1, C2)").WithLocation(4, 20)
Semantics\ExtensionOperatorsTests.cs (40)
963
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("I1.operator -(I1)", "I3.operator -(I3)").WithLocation(32, 17)
1030
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("NS1.Extensions2.extension(I1).operator -(I1)", "NS1.Extensions2.extension(I3).operator -(I3)").WithLocation(34, 21)
1738
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("Extensions2.extension(C1).operator -(C1)", "Extensions1.extension(C1).operator -(C1)").WithLocation(35, 13),
1741
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("Extensions1.extension(C1).operator checked -(C1)", "Extensions2.extension(C1).operator -(C1)").WithLocation(39, 17)
4275
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("Extensions2.extension(S2).operator -(S2)", "Extensions1.extension(S2).operator -(S2)").WithLocation(26, 13)
5862
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "--").WithArguments("I1.operator --(I1)", "I3.operator --(I3)").WithLocation(33, 17)
6059
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "--").WithArguments("NS1.Extensions2.extension(I1).operator --(I1)", "NS1.Extensions2.extension(I3).operator --(I3)").WithLocation(35, 21)
7671
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "--").WithArguments("Extensions2.extension(C1).operator --(C1)", "Extensions1.extension(C1).operator --(C1)").WithLocation(35, 13),
7674
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "--").WithArguments("Extensions1.extension(C1).operator checked --(C1)", "Extensions2.extension(C1).operator --(C1)").WithLocation(39, 17)
10567
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "++").WithArguments("Extensions2.extension(S2).operator ++(S2)", "Extensions1.extension(S2).operator ++(S2)").WithLocation(26, 9)
11869
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("I1.operator -(I1, I1)", "I3.operator -(I3, I3)").WithLocation(32, 19)
11936
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("NS1.Extensions2.extension(I1).operator -(I1, I1)", "NS1.Extensions2.extension(I3).operator -(I3, I3)").WithLocation(34, 23)
13291
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("Extensions2.extension(C1).operator -(C1, C1)", "Extensions1.extension(C1).operator -(C1, C1)").WithLocation(35, 16),
13294
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("Extensions1.extension(C1).operator checked -(C1, C1)", "Extensions2.extension(C1).operator -(C1, C1)").WithLocation(39, 20)
15217
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "&&").WithArguments("I1.operator &(I1, I1)", "I3.operator &(I3, I3)").WithLocation(38, 19)
15282
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "&&").WithArguments("I1.operator &(I1, I1)", "I3.operator &(I3, I3)").WithLocation(34, 19)
15341
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "&&").WithArguments("NS1.Extensions2.extension(I1).operator &(I1, I1)", "NS1.Extensions2.extension(I3).operator &(I3, I3)").WithLocation(40, 23)
15409
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "&&").WithArguments("NS1.Extensions2.extension(I1).operator &(I1, I1)", "NS1.Extensions2.extension(I3).operator &(I3, I3)").WithLocation(36, 23)
15452
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "&&").WithArguments("Extensions2.extension(I1).operator &(I1, I1)", "Extensions2.extension(I3).operator &(I3, I3)").WithLocation(26, 19)
19971
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("Extensions1.extension(S2).operator +(S2, C1)", "Extensions1.extension(S2).operator +(S2, C2)").WithLocation(29, 16)
21524
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-=").WithArguments("I1.operator -(I1, I1)", "I3.operator -(I3, I3)").WithLocation(33, 19)
21721
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-=").WithArguments("NS1.Extensions2.extension(I1).operator -(I1, I1)", "NS1.Extensions2.extension(I3).operator -(I3, I3)").WithLocation(35, 23)
23846
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-=").WithArguments("Extensions2.extension(C1).operator -(C1, C1)", "Extensions1.extension(C1).operator -(C1, C1)").WithLocation(35, 16),
23849
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-=").WithArguments("Extensions1.extension(C1).operator checked -(C1, C1)", "Extensions2.extension(C1).operator -(C1, C1)").WithLocation(39, 20)
27593
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+=").WithArguments("Extensions1.extension(S2).operator +(S2, C1)", "Extensions1.extension(S2).operator +(S2, C2)").WithLocation(29, 12)
27759
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("E1.extension(S).operator +(S, S)", "E2.extension(in S).operator +(S, S)").WithLocation(1, 13));
27838
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("N1.E1.extension(C).operator +(C, C)", "N2.E2.extension(C).operator +(C, C)").WithLocation(4, 13));
27926
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("N1.E1.extension(C).operator +(C, C)", "N2.E2.extension(C).operator +(C, C)").WithLocation(4, 13));
28345
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+=").WithArguments("N1.E1.extension(C).operator +(C, C)", "N2.E2.extension(C).operator +(C, C)").WithLocation(5, 3));
28508
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("N1.E1.extension(C).operator +(C)", "N2.E2.extension(C).operator +(C)").WithLocation(5, 5));
28675
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "++").WithArguments("N1.E1.extension(C).operator ++(C)", "N2.E2.extension(C).operator ++(C)").WithLocation(5, 6));
28802
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "++").WithArguments("N1.E1.extension(C).operator ++(C)", "N2.E2.extension(C).operator ++(C)").WithLocation(5, 5));
29666
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+=").WithArguments("E1.extension(I1).operator +(I1, int)", "E2.extension(I1).operator +(I1, int)").WithLocation(4, 4));
29917
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+=").WithArguments("E1.extension(C1).operator +(C1, C3)", "E2.extension(C1).operator +(C1, C3)").WithLocation(2, 4));
29945
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+=").WithArguments("C1.operator +(C1, C2)", "C2.operator +(C1, C2)").WithLocation(2, 4));
29981
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+=").WithArguments("C1.operator +(C1, C2)", "C2.operator +(C1, C2)").WithLocation(2, 4));
30070
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("E1.extension(C1).operator +(C1, C2)", "E2.extension(C1).operator +(C1, C2)").WithLocation(1, 14));
30105
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "==").WithArguments("E1.extension(C1).operator ==(C1, C2)", "E2.extension(C1).operator ==(C1, C2)").WithLocation(1, 14));
30154
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("E1.extension(C1).operator +(C1)", "E2.extension(C1).operator +(C1)").WithLocation(2, 5));
30187
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "++").WithArguments("E1.extension(C1).operator ++(C1)", "E2.extension(C1).operator ++(C1)").WithLocation(2, 5));
Semantics\ExtensionTests2.cs (2)
36127
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("E1.extension(C).operator +(C, C)", "E2.extension(C).operator +(C, C)").WithLocation(1, 13));
36243
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("E1.extension(C).operator +(C, C)", "E2.extension(C).operator +(C, C)").WithLocation(1, 13));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IBinaryOperatorExpression.cs (1)
4440
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "&&").WithArguments("C.B3.operator &(C.B3, C.B2)", "C.B2.operator &(C.B3, C.B2)").WithLocation(6, 20)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\DelegateTypeTests.cs (2)
10784
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("C.operator +(C, System.Delegate)", "C.operator +(C, System.Linq.Expressions.Expression)").WithLocation(10, 15),
10787
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("C.operator +(C, System.Delegate)", "C.operator +(C, System.Linq.Expressions.Expression)").WithLocation(11, 15)
Semantics\NullableReferenceTypesTests.cs (2)
146681
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("I<(int a, int b)>.operator +(I<(int a, int b)>, I<(int a, int b)>)", "I<(int c, int d)>.operator +(I<(int c, int d)>, I<(int c, int d)>)").WithLocation(13, 19),
146684
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("I<(int a, int b)>.operator +(I<(int a, int b)>, I<(int a, int b)>)", "I<(int c, int d)>.operator +(I<(int c, int d)>, I<(int c, int d)>)").WithLocation(14, 15)
Semantics\OperatorTests.cs (3)
1352
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("C.operator +(C, B)", "B.operator +(C, B)").WithLocation(16, 33)
1552
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("D<object>.C.operator +(D<object>.C, D<object>.C)", "D<dynamic>.C.operator +(D<dynamic>.C, D<dynamic>.C)").WithLocation(16, 29)
6168
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "==").WithArguments("S.operator ==(S?, decimal?)", "S.operator ==(S?, double?)").WithLocation(16, 11));
Semantics\OverloadResolutionPerfTests.cs (1)
70
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("C.operator +(C, C0)", "C.operator +(C, C1)").WithLocation(3, 31));
Semantics\OverloadResolutionTests.cs (2)
10591
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("Test.operator +(in Test, Test)", "Test.operator +(Test, in Test)").WithLocation(15, 29));
10616
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("Test.operator +(Test, in Test)", "Test.operator +(in Test, Test)").WithLocation(15, 29));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Symbols\DefaultInterfaceImplementationTests.cs (8)
47462
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("I1.operator -(I1)", "I3.operator -(I3)").WithLocation(7, 17)
47675
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("C1.operator +(C1, I2)", "C1.operator +(C1, I1)").WithLocation(7, 26)
47808
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("C1.operator +(I2, C1)", "C1.operator +(I1, C1)").WithLocation(7, 19)
47933
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("I1.operator +(I1, I2)", "I2.operator +(I1, I2)").WithLocation(8, 19),
48000
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("I2.operator +(I2, I1)", "I1.operator +(I2, I1)").WithLocation(8, 19),
48654
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("I1.operator +(I1, I2)", "I2.operator +(I1, I2)").WithLocation(8, 19),
48724
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "+").WithArguments("I2.operator +(I2, I1)", "I1.operator +(I2, I1)").WithLocation(8, 19),
48797
Diagnostic(ErrorCode.
ERR_AmbigOperator
, "-").WithArguments("I1.operator -(I1, I1)", "I3.operator -(I3, I3)").WithLocation(7, 19)