242 references to ERR_OverrideNotExpected
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
711
or ErrorCode.
ERR_OverrideNotExpected
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
806
diagnostics.Add(ErrorCode.
ERR_OverrideNotExpected
, overridingMemberLocation, overridingMember);
828
diagnostics.Add(ErrorCode.
ERR_OverrideNotExpected
, overridingMemberLocation, overridingMember);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (10)
CodeGen\CodeGenFunctionPointersTests.cs (9)
6178
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived1.M1(delegate* unmanaged[Cdecl]<void>)").WithLocation(11, 29),
6184
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("Derived1.M3(delegate* unmanaged[Fastcall, Thiscall]<void>)").WithLocation(13, 29),
6190
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("Derived2.M3(delegate* unmanaged[Stdcall, Fastcall]<void>)").WithLocation(20, 29),
6346
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments($"Derived.M1(delegate*<{refKind2}string, void>)").WithLocation(9, 29),
6377
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments($"Derived.M1(delegate*<{(string.IsNullOrWhiteSpace(refKind2) ? "" : refKind2)}string>)").WithLocation(9, 29),
6402
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived.M1(delegate*<string, void>)").WithLocation(9, 29),
6427
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived.M1(delegate*<string>)").WithLocation(9, 29),
6877
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived.M1(delegate*<int[], void>)").WithLocation(4, 26),
6883
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("Derived.M3(delegate*<int[]>)").WithLocation(6, 26),
PrivateProtected.cs (1)
762
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F").WithArguments("B.F()").WithLocation(3, 37),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (33)
RefReadonlyParameterTests.cs (2)
6053
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M").WithArguments("C.M(ref readonly int)").WithLocation(7, 29));
6072
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M").WithArguments($"C.M({modifier} int)").WithLocation(7, 29));
Semantics\RecordTests.cs (14)
6541
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(2, 15)
6825
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(2, 15)
11022
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(1, 8),
11025
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.Equals(A?)").WithLocation(1, 8),
11028
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(1, 8),
11093
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(1, 8),
11096
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.Equals(A?)").WithLocation(1, 8),
11099
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(1, 8),
11183
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "C").WithArguments("C.EqualityContract").WithLocation(1, 8),
11186
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "C").WithArguments("C.Equals(B?)").WithLocation(1, 8),
11189
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "C").WithArguments("C.PrintMembers(System.Text.StringBuilder)").WithLocation(1, 8),
12641
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(1, 8));
19854
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(2, 15),
19866
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "EqualityContract").WithArguments("F.EqualityContract").WithLocation(21, 36)
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (17)
1524
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("S1.operator " + op + @"()").WithLocation(4, 34),
1527
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("S1.operator checked " + op + @"()").WithLocation(5, 42)
1953
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C1.operator " + op + @"()").WithLocation(4, 41),
1959
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C2.operator checked " + op + @"()").WithLocation(9, 50),
2012
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C1.operator " + op + @"()").WithLocation(4, 50),
2021
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C2.operator checked " + op + @"()").WithLocation(9, 59),
2716
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("S1.operator " + op + @"()").WithLocation(4, 38)
9842
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("S1.operator " + op + @"(int)").WithLocation(4, 34),
9845
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("S1.operator checked " + op + @"(int)").WithLocation(5, 42)
9881
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("S1.operator " + op + @"(int)").WithLocation(4, 34)
10381
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(4, 41),
10387
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C2.operator checked " + op + @"(int)").WithLocation(9, 50)
10408
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(4, 41)
10438
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(4, 50),
10447
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C2.operator checked " + op + @"(int)").WithLocation(9, 59)
10471
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("C1.operator " + op + @"(int)").WithLocation(4, 50)
11547
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, op).WithArguments("S1.operator " + op + @"(int)").WithLocation(4, 38)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
706
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "ToString").WithArguments("ToString()"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (176)
Semantics\InheritanceBindingTests.cs (107)
585
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 15, Column = 26 },
586
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 16, Column = 26 },
587
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 17, Column = 26 },
588
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 18, Column = 26 },
628
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 21, Column = 25 }, //0
630
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 23, Column = 25 }, //2
635
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 30, Column = 25 }, //9
676
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[long, long, long, long]"),
680
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[long, long, char, long]"),
690
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[string]"));
719
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Event0").WithArguments("Derived.Event0"),
725
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Event2").WithArguments("Derived.Event2"),
728
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Event3").WithArguments("Derived.Event3"));
1846
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 20, Column = 25 },
1847
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 21, Column = 25 },
1848
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 22, Column = 25 },
1849
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 23, Column = 25 },
1850
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 24, Column = 25 },
1851
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 25, Column = 25 },
1852
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 26, Column = 25 },
1853
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 27, Column = 25 },
1854
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 28, Column = 25 },
1855
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 29, Column = 25 },
1856
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 30, Column = 25 },
1857
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 31, Column = 25 },
1858
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 32, Column = 25 },
1859
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 34, Column = 25 },
1860
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 35, Column = 25 },
1861
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 36, Column = 25 },
1862
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 37, Column = 25 },
1863
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 38, Column = 25 },
1864
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 39, Column = 25 },
1865
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 40, Column = 25 },
1866
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 41, Column = 25 },
1867
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 42, Column = 25 },
1868
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 43, Column = 25 },
1869
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 44, Column = 25 }
2015
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int, long]"),
2017
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int, params int[]]"),
2019
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[double]"),
2021
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[ref int]"));
2047
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int]"),
2049
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[out long]"));
2077
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[System.Exception, System.ArgumentException, System.Exception]"),
2079
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[System.ArgumentException, System.ArgumentException]"),
2081
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this"),
2083
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[System.Exception]"));
2107
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[string[], string[]]"),
2109
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[string[][], string[]]"),
2111
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[string[]]"));
2135
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[System.Collections.Generic.List<int>, System.Collections.Generic.Dictionary<string, long>]"),
2137
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[System.Collections.Generic.Dictionary<int, long>, System.Collections.Generic.List<string>]"));
2160
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int, long]"),
2162
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int]"));
2187
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int, params short[]]"),
2189
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int]"),
2191
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int, short, short]"));
2218
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[out long]"),
2220
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[long]"));
2247
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[ref int]"),
2249
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[int]"));
2347
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B>.Method(B)"),
2348
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B>.Method(System.Collections.Generic.List<B>)"),
2349
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B>.Method<V>(A, V)"),
2350
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B>.Method<V>(System.Collections.Generic.List<V>, System.Collections.Generic.List<A>)"),
2351
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B>.Method<V, U>(System.Collections.Generic.List<V>, System.Collections.Generic.List<U>)"),
2352
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method(int)"),
2353
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method(System.Collections.Generic.List<int>)"),
2354
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V>(int, long)"),
2355
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V>(System.Collections.Generic.List<V>, System.Collections.Generic.List<long>)"),
2356
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V>(System.Collections.Generic.List<long>, System.Collections.Generic.List<int>)"),
2357
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B, C>.Method()"),
2358
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B, C>.Method(System.Collections.Generic.List<A>, System.Collections.Generic.List<B>)"),
2359
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B, C>.Method<V>(V, A, C)"),
2360
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B, C>.Method<V>(System.Collections.Generic.List<V>, ref System.Collections.Generic.List<B>)"),
2361
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived<A, B, C>.Method<V>(System.Collections.Generic.List<V>, System.Collections.Generic.List<B>[])"));
2392
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method()"),
2393
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V, U>()"),
2394
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V>(int, V)"),
2395
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V, U>(V, int)"),
2396
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method(int, int)"),
2397
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V>(int, int)"),
2398
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V, U, W>(int, int)"),
2399
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Derived.Method<V, W>(System.Collections.Generic.List<W>, System.Collections.Generic.List<V>)"));
2462
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Derived.this[object, object]"));
5087
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 4, Column = 28 }, //can't see internal method in other compilation
5108
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 4, Column = 28 }, //can't see internal method in other compilation
5129
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 4, Column = 28 }, //can't see internal method in other compilation
5150
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 4, Column = 43 }, //can't see internal method in other compilation
5539
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 5, Column = 29 },
5540
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 6, Column = 38 },
5541
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 7, Column = 26 },
5606
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 5, Column = 29 },
5607
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 6, Column = 38 },
5608
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 7, Column = 26 },
5673
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 5, Column = 29 },
5674
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 6, Column = 38 },
5675
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 7, Column = 26 },
5740
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 5, Column = 44 },
5741
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 6, Column = 53 },
5742
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 7, Column = 41 },
5921
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "set").WithArguments("Derived1.Property1.set"));
5939
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "set").WithArguments("Derived1.this[int].set"));
7653
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Outer<T>.Inner<U>.Derived1<X, Y>.Method<X>(X, int[], System.Collections.Generic.List<long>, System.Collections.Generic.Dictionary<Y, X>)"),
7655
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method").WithArguments("Outer<T>.Inner<U>.Derived1<X, Y>.Method<X, Y>(X, int[], System.Collections.Generic.List<X>, System.Collections.Generic.Dictionary<Y, Y>)"),
9074
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Goo").WithArguments("Derived.Goo<T>(T)").WithLocation(8, 26),
9096
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Goo").WithArguments("Derived.Goo<T>(T)").WithLocation(8, 26),
Semantics\InitOnlyMemberTests.cs (1)
3742
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M").WithArguments("Derived.M()").WithLocation(4, 26)
Semantics\MultiDimensionalArrayTests.cs (1)
445
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Test2").WithArguments("C.Test2(double[])").WithLocation(3, 28)
Semantics\NullableReferenceTypesTests.cs (65)
11493
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(T?)").WithLocation(16, 26),
11693
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M5").WithArguments("B.M5<T>(C<T?>)").WithLocation(43, 26),
11760
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(T?)").WithLocation(11, 26),
11823
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M2").WithArguments("B.M2<T>(T?)").WithLocation(27, 26),
11826
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("B.M3<T>(T?)").WithLocation(31, 26),
11832
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(T?)").WithLocation(23, 26),
12091
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M4").WithArguments("B.M4(string?)").WithLocation(39, 26),
12094
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M5").WithArguments("B.M5(string?)").WithLocation(43, 26)
12248
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("B.M3(int)").WithLocation(35, 26),
12254
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1(int?)").WithLocation(27, 26)
13667
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M2").WithArguments("B.M2<T>(T?[])").WithLocation(22, 26),
13670
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("B.M3<T>(T?[]?)").WithLocation(26, 26),
13735
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M2").WithArguments("B.M2<T>(T?[])").WithLocation(18, 26),
98328
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<T11>(T11?)").WithLocation(15, 26),
98370
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<T11>(T11?)").WithLocation(4, 26),
98413
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<T11>(T11?)").WithLocation(4, 26),
98522
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<T11>(T11?)").WithLocation(15, 26),
110413
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<U>(U?)").WithLocation(14, 28),
110419
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B.F2<U>(U?)").WithLocation(15, 28),
110425
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F4").WithArguments("B.F4<U>(U?)").WithLocation(17, 28),
110431
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F6").WithArguments("B.F6<U>(U?)").WithLocation(19, 28),
110437
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F7").WithArguments("B.F7<U>(U?)").WithLocation(20, 28),
150230
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B0.F2<T>(T?)").WithLocation(10, 28),
150239
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B1.F1<T>(T?)").WithLocation(14, 28),
150254
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B3.F1<T>(T?)").WithLocation(24, 28),
150719
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
150725
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
150740
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
150746
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
150767
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
150773
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
150788
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
150794
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
150847
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
150853
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
150868
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
150874
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
150927
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
150933
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
150948
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
150954
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
151004
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
151010
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
151022
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
151028
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
151090
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
151096
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
151111
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
151117
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
151170
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2.F1<U>(U?)").WithLocation(9, 26),
151176
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2.F2<U>(U?)").WithLocation(10, 26),
151191
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4.F1<U>(U?)").WithLocation(19, 26),
151197
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4.F2<U>(U?)").WithLocation(20, 26),
151259
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2.F1<U>(U?)").WithLocation(9, 26),
151265
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2.F2<U>(U?)").WithLocation(10, 26),
151277
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4.F1<U>(U?)").WithLocation(19, 26),
151283
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4.F2<U>(U?)").WithLocation(20, 26),
153407
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2.F1<T>(T?)").WithLocation(13, 26),
153413
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2.F2<T>(T?)").WithLocation(14, 26),
153419
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F3").WithArguments("B2.F3<T>(T?)").WithLocation(15, 26),
153425
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F4").WithArguments("B2.F4<T>(T?)").WithLocation(16, 26),
153431
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F5").WithArguments("B2.F5<T>(T?)").WithLocation(17, 26),
153437
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F6").WithArguments("B2.F6<T>(T?)").WithLocation(18, 26),
156391
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(C<T??>)").WithLocation(11, 26),
156425
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(T??)").WithLocation(11, 26),
Semantics\OverloadResolutionTests.cs (1)
6886
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Override").WithArguments("C.Override<T>(T)"));
Semantics\TopLevelStatementsTests.cs (1)
4405
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "localE").WithArguments("<invalid-global-code>.localE()").WithLocation(10, 15),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (18)
Symbols\ExtendedPartialMethodsTests.cs (1)
2979
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived.M1(int[])").WithLocation(4, 34),
Symbols\IndexerTests.cs (1)
1372
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("Test.this[int]"));
Symbols\OverriddenOrHiddenMembersTests.cs (7)
1190
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Sub01").WithArguments("CSClass.Sub01(Metadata.B, Metadata.B)").WithLocation(11, 29), // CS0115
1191
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Sub01").WithArguments("CSClass.Sub01(params Metadata.B[])").WithLocation(15, 28) // CS0115
1742
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "AddAbstract").WithArguments("Derived.AddAbstract(System.Action)"),
4424
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method2").WithArguments("ChildClass.Method2(ref int)").WithLocation(10, 26),
4427
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Method1").WithArguments("ChildClass.Method1(in int)").WithLocation(9, 26));
4558
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("B.this[int]").WithLocation(8, 25),
4581
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "this").WithArguments("B.this[in int]").WithLocation(8, 25),
Symbols\Source\RecordTests.cs (6)
1305
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(3, 8),
1308
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.Equals(A?)").WithLocation(3, 8),
1311
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(3, 8),
1361
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "E").WithArguments("E.EqualityContract").WithLocation(3, 8),
1364
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "E").WithArguments("E.Equals(A?)").WithLocation(3, 8),
1367
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "E").WithArguments("E.PrintMembers(System.Text.StringBuilder)").WithLocation(3, 8),
Symbols\SymbolErrorTests.cs (3)
2294
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 10, Column = 29 });
11557
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 10, Column = 31 },
11558
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 11, Column = 30 });
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ParserErrorMessageTests.cs (1)
953
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M4").WithArguments("B.M4<T>()").WithLocation(19, 37));