222 references to ERR_OverrideNotExpected
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
650
case ErrorCode.
ERR_OverrideNotExpected
:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
805
diagnostics.Add(ErrorCode.
ERR_OverrideNotExpected
, overridingMemberLocation, overridingMember);
827
diagnostics.Add(ErrorCode.
ERR_OverrideNotExpected
, overridingMemberLocation, overridingMember);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (10)
CodeGen\CodeGenFunctionPointersTests.cs (9)
6164
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived1.M1(delegate* unmanaged[Cdecl]<void>)").WithLocation(11, 29),
6170
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("Derived1.M3(delegate* unmanaged[Fastcall, Thiscall]<void>)").WithLocation(13, 29),
6176
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("Derived2.M3(delegate* unmanaged[Stdcall, Fastcall]<void>)").WithLocation(20, 29),
6332
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments($"Derived.M1(delegate*<{refKind2}string, void>)").WithLocation(9, 29),
6363
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments($"Derived.M1(delegate*<{(string.IsNullOrWhiteSpace(refKind2) ? "" : refKind2)}string>)").WithLocation(9, 29),
6388
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived.M1(delegate*<string, void>)").WithLocation(9, 29),
6413
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived.M1(delegate*<string>)").WithLocation(9, 29),
6863
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived.M1(delegate*<int[], void>)").WithLocation(4, 26),
6869
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("Derived.M3(delegate*<int[]>)").WithLocation(6, 26),
PrivateProtected.cs (1)
765
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F").WithArguments("B.F()").WithLocation(3, 37),
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
705
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "ToString").WithArguments("ToString()"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (189)
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)
3731
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 (64)
11481
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(T?)").WithLocation(16, 26),
11681
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M5").WithArguments("B.M5<T>(C<T?>)").WithLocation(43, 26),
11748
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(T?)").WithLocation(11, 26),
11811
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M2").WithArguments("B.M2<T>(T?)").WithLocation(27, 26),
11814
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("B.M3<T>(T?)").WithLocation(31, 26),
11820
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(T?)").WithLocation(23, 26),
12079
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M4").WithArguments("B.M4(string?)").WithLocation(39, 26),
12082
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M5").WithArguments("B.M5(string?)").WithLocation(43, 26)
12236
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("B.M3(int)").WithLocation(35, 26),
12242
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1(int?)").WithLocation(27, 26)
13655
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M2").WithArguments("B.M2<T>(T?[])").WithLocation(22, 26),
13658
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M3").WithArguments("B.M3<T>(T?[]?)").WithLocation(26, 26),
13723
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M2").WithArguments("B.M2<T>(T?[])").WithLocation(18, 26),
94558
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<T11>(T11?)").WithLocation(15, 26),
94600
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<T11>(T11?)").WithLocation(4, 26),
94643
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<T11>(T11?)").WithLocation(4, 26),
94752
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<T11>(T11?)").WithLocation(15, 26),
106643
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B.F1<U>(U?)").WithLocation(14, 28),
106649
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B.F2<U>(U?)").WithLocation(15, 28),
106655
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F4").WithArguments("B.F4<U>(U?)").WithLocation(17, 28),
106661
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F6").WithArguments("B.F6<U>(U?)").WithLocation(19, 28),
106667
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F7").WithArguments("B.F7<U>(U?)").WithLocation(20, 28),
145800
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B0.F2<T>(T?)").WithLocation(10, 28),
145809
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B1.F1<T>(T?)").WithLocation(14, 28),
145824
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B3.F1<T>(T?)").WithLocation(24, 28),
146289
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
146295
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
146310
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
146316
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
146337
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
146343
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
146358
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
146364
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
146417
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
146423
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
146438
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
146444
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
146497
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
146503
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
146518
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
146524
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
146574
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
146580
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
146592
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
146598
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
146660
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2<T>.F1<U>(U?)").WithLocation(9, 26),
146666
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2<T>.F2<U>(U?)").WithLocation(10, 26),
146681
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4<T>.F1<U>(U?)").WithLocation(19, 26),
146687
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4<T>.F2<U>(U?)").WithLocation(20, 26),
146740
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2.F1<U>(U?)").WithLocation(9, 26),
146746
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2.F2<U>(U?)").WithLocation(10, 26),
146761
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4.F1<U>(U?)").WithLocation(19, 26),
146767
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4.F2<U>(U?)").WithLocation(20, 26),
146829
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2.F1<U>(U?)").WithLocation(9, 26),
146835
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2.F2<U>(U?)").WithLocation(10, 26),
146847
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B4.F1<U>(U?)").WithLocation(19, 26),
146853
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B4.F2<U>(U?)").WithLocation(20, 26),
148977
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F1").WithArguments("B2.F1<T>(T?)").WithLocation(13, 26),
148983
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F2").WithArguments("B2.F2<T>(T?)").WithLocation(14, 26),
148989
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F3").WithArguments("B2.F3<T>(T?)").WithLocation(15, 26),
148995
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F4").WithArguments("B2.F4<T>(T?)").WithLocation(16, 26),
149001
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F5").WithArguments("B2.F5<T>(T?)").WithLocation(17, 26),
149007
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "F6").WithArguments("B2.F6<T>(T?)").WithLocation(18, 26),
151949
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("B.M1<T>(T??)").WithLocation(11, 26),
Semantics\OverloadResolutionTests.cs (1)
6888
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "Override").WithArguments("C.Override<T>(T)"));
Semantics\RecordTests.cs (14)
6486
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(2, 15)
6770
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(2, 15)
10967
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(1, 8),
10970
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.Equals(A?)").WithLocation(1, 8),
10973
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(1, 8),
11038
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(1, 8),
11041
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.Equals(A?)").WithLocation(1, 8),
11044
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.PrintMembers(System.Text.StringBuilder)").WithLocation(1, 8),
11128
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "C").WithArguments("C.EqualityContract").WithLocation(1, 8),
11131
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "C").WithArguments("C.Equals(B?)").WithLocation(1, 8),
11134
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "C").WithArguments("C.PrintMembers(System.Text.StringBuilder)").WithLocation(1, 8),
12586
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(1, 8));
19757
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "B").WithArguments("B.EqualityContract").WithLocation(2, 15),
19769
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "EqualityContract").WithArguments("F.EqualityContract").WithLocation(21, 36)
Semantics\TopLevelStatementsTests.cs (1)
4392
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "localE").WithArguments("<invalid-global-code>.localE()").WithLocation(10, 15),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (18)
Symbols\ExtendedPartialMethodsTests.cs (1)
2571
Diagnostic(ErrorCode.
ERR_OverrideNotExpected
, "M1").WithArguments("Derived.M1(int[])").WithLocation(4, 34),
Symbols\IndexerTests.cs (1)
1370
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)
2290
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 10, Column = 29 });
11414
new ErrorDescription { Code = (int)ErrorCode.
ERR_OverrideNotExpected
, Line = 10, Column = 31 },
11415
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));