81 references to ERR_ExplicitImplementationOfOperatorsMustBeStatic
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2184
or ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
93
diagnostics.Add(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, this.GetFirstLocation(), this);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (3)
240
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C2.operator " + op + "(C1)").WithLocation(4, 21),
249
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C2.operator " + op + "(C1, C1)").WithLocation(5, 21),
258
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C2.operator " + op + "(C1, C1, C1)").WithLocation(6, 21),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (18)
Symbols\StaticAbstractMembersInInterfacesTests.cs (18)
17535
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4)").WithLocation(26, 24 + checkedKeyword.Length),
17678
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4)").WithLocation(26, 24 + checkedKeyword.Length),
17809
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4)").WithLocation(26, 24 + checkedKeyword.Length),
17922
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4)").WithLocation(26, 24 + checkedKeyword.Length),
18070
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4, int)").WithLocation(26, 24 + checkedKeyword.Length),
18201
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("C4.operator " + checkedKeyword + op + "(C4, int)").WithLocation(26, 24 + checkedKeyword.Length),
18316
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1)").WithLocation(22, 20 + checkedKeyword.Length),
18463
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1)").WithLocation(22, 20 + checkedKeyword.Length),
18610
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1)").WithLocation(22, 20 + checkedKeyword.Length),
18763
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1)").WithLocation(22, 20 + checkedKeyword.Length),
18938
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + op + "(I1, int)").WithLocation(22, 20),
18960
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1, int)").WithLocation(22, 20 + checkedKeyword.Length),
19130
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + op + "(I1, int)").WithLocation(22, 20),
19152
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, op).WithArguments("I5.operator " + checkedKeyword + op + "(I1, int)").WithLocation(22, 20 + checkedKeyword.Length),
28376
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C4." + op + " operator " + checkedKeyword + "int(C4)").WithLocation(26, 30 + checkedKeyword.Length),
28507
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C4." + op + " operator " + checkedKeyword + "int(C4)").WithLocation(26, 30 + checkedKeyword.Length),
28622
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("I5<T>." + op + " operator " + checkedKeyword + "int(T)").WithLocation(22, 29 + checkedKeyword.Length),
28779
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("I5<T>." + op + " operator " + checkedKeyword + "int(T)").WithLocation(22, 29 + checkedKeyword.Length),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (58)
Parsing\MemberDeclarationParsingTests.cs (58)
2335
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 35));
2348
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 35));
2455
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
2477
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
2580
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
2602
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
2698
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 35));
2714
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 35));
2804
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 33));
2820
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 33));
3216
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 35));
3229
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 35));
3340
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
3362
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
3468
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
3490
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 26));
3590
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 35));
3606
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 35));
3700
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 33));
3716
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 33));
4258
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 28));
4268
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 28));
4371
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
4390
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
4488
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
4507
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
4599
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 28));
4612
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 28));
4698
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 26));
4711
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 26));
5098
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 28));
5108
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int, int)").WithLocation(1, 28));
5215
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
5234
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
5336
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
5355
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "").WithArguments("C.operator +(int)").WithLocation(1, 19));
5451
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 28));
5464
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 28));
5554
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 26));
5567
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "+").WithArguments("C.operator +(int)").WithLocation(1, 26));
6283
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
6293
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
6373
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 24));
6386
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 24));
6524
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
6537
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
6624
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 31));
6637
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 31));
7008
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 33));
7018
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 33));
7105
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 24));
7121
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 24));
7215
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 25));
7228
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 25));
7319
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
7332
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.implicit operator int(int)").WithLocation(1, 33));
7423
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 31));
7436
Diagnostic(ErrorCode.
ERR_ExplicitImplementationOfOperatorsMustBeStatic
, "int").WithArguments("C.explicit operator int(int)").WithLocation(1, 31));