248 references to WRN_DeprecatedSymbol
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (2)
336
case ErrorCode.
WRN_DeprecatedSymbol
:
991
or ErrorCode.
WRN_DeprecatedSymbol
Generated\ErrorFacts.Generated.cs (1)
45
case ErrorCode.
WRN_DeprecatedSymbol
:
Symbols\ObsoleteAttributeHelpers.cs (2)
211
(message: null, isError: _, isColInit: false) => ErrorCode.
WRN_DeprecatedSymbol
,
230
ErrorCode.
WRN_DeprecatedSymbol
or ErrorCode.ERR_DeprecatedCollectionInitAddStr or
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (69)
BreakingChanges.cs (1)
1402
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ObsoleteType").WithArguments("ObsoleteType"));
CodeGen\CodeGenAwaitForeachTests.cs (15)
326
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.GetAsyncEnumerator(System.Threading.CancellationToken)").WithLocation(6, 15),
329
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.MoveNextAsync()").WithLocation(6, 15),
332
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.Current").WithLocation(6, 15)
4857
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.AsyncEnumerator.DisposeAsync()").WithLocation(7, 15),
4860
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.GetAsyncEnumerator(System.Threading.CancellationToken)").WithLocation(7, 15),
4863
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.AsyncEnumerator.MoveNextAsync()").WithLocation(7, 15),
4866
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.AsyncEnumerator.Current").WithLocation(7, 15)
4903
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.AsyncEnumerator.DisposeAsync()").WithLocation(7, 15),
4906
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.GetAsyncEnumerator(System.Threading.CancellationToken)").WithLocation(7, 15),
4909
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.AsyncEnumerator.MoveNextAsync()").WithLocation(7, 15),
4912
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.AsyncEnumerator.Current").WithLocation(7, 15)
8577
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.DisposeAsync()").WithLocation(8, 15),
8580
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("Extensions.GetAsyncEnumerator(C)").WithLocation(8, 15),
8583
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.MoveNextAsync()").WithLocation(8, 15),
8586
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.Current").WithLocation(8, 15)
CodeGen\CodeGenAwaitUsingTests.cs (3)
325
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "var x = new C()").WithArguments("C.DisposeAsync()").WithLocation(6, 22)
335
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "var x = new C()").WithArguments("C.DisposeAsync()").WithLocation(6, 22),
345
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "var x = new C()").WithArguments("C.DisposeAsync()").WithLocation(6, 22)
CodeGen\CodeGenDeconstructTests.cs (2)
165
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.Deconstruct(out int, out string)").WithLocation(9, 18),
168
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new[] { new C() }").WithArguments("C.Deconstruct(out int, out string)").WithLocation(10, 34)
CodeGen\CodeGenForEachTests.cs (9)
4931
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("Extensions.GetEnumerator(C)").WithLocation(7, 9),
4934
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.MoveNext()").WithLocation(7, 9),
4937
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.Current").WithLocation(7, 9));
5627
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.GetEnumerator()").WithLocation(1, 1),
5630
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.MyEnumerator.MoveNext()").WithLocation(1, 1),
5633
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.MyEnumerator.Current").WithLocation(1, 1));
5697
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.GetEnumerator()").WithLocation(1, 1),
5700
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.MyEnumerator.MoveNext()").WithLocation(1, 1),
5703
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.MyEnumerator.Current").WithLocation(1, 1));
CodeGen\CodeGenTupleTest.cs (37)
8079
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "((int i, bool c))x").WithArguments("C.implicit operator bool(C)").WithLocation(5, 5),
8082
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(6, 26),
8085
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "x").WithArguments("C.implicit operator bool(C)").WithLocation(10, 5),
8088
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(11, 9)
8118
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "((int i, bool c)?)x").WithArguments("C.implicit operator bool(C)").WithLocation(5, 5),
8121
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(6, 27),
8124
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "x").WithArguments("C.implicit operator bool(C)").WithLocation(10, 5),
8127
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(11, 9)
8194
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "((int i, bool c)?)x").WithArguments("C.implicit operator bool(C)").WithLocation(5, 5),
8197
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "x").WithArguments("C.implicit operator bool(C)").WithLocation(9, 5)
8249
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "((int i, bool c))x").WithArguments("C.implicit operator bool(C)").WithLocation(3, 5)
13140
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int)").WithArguments("(T1, T2)").WithLocation(8, 19),
13143
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int)").WithArguments("(int, int)").WithLocation(8, 19),
13146
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int, int, int, int, int, int, int, int)").WithArguments("(T1, T2)").WithLocation(13, 12),
13149
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int a, int b)").WithArguments("(T1, T2)").WithLocation(23, 12),
13152
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int a, int b)").WithArguments("(int a, int b)").WithLocation(23, 12),
13158
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int a, int b, int c, int d, int e, int f, int g, int h, int Item2)").WithArguments("(T1, T2)").WithLocation(35, 12),
13167
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(101, 102)").WithArguments("(T1, T2)").WithLocation(10, 16),
13170
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 1, 1, 1, 1, 1, 1, 1, 1)").WithArguments("(T1, T2)").WithLocation(15, 16),
13173
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 1)").WithArguments("(T1, T2)").WithLocation(25, 16),
13176
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().Item1").WithArguments("(int, int).Item1").WithLocation(30, 34),
13179
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().Item20").WithArguments("(int, int).Item20").WithLocation(31, 34),
13182
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M102().a").WithArguments("(int a, int b).a").WithLocation(32, 34),
13185
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 1, 1, 1, 1, 1, 1, 1, 1)").WithArguments("(T1, T2)").WithLocation(37, 16),
13188
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().M2()").WithArguments("(int, int).M2()").WithLocation(98, 9),
13191
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().P2").WithArguments("(int, int).P2").WithLocation(99, 17),
13194
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().E2").WithArguments("(int, int).E2").WithLocation(100, 9),
22485
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int)").WithArguments("(T1, T2)").WithLocation(6, 9),
22488
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int)").WithArguments("(int, int)").WithLocation(6, 9),
22491
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2)").WithArguments("(T1, T2)").WithLocation(6, 25),
22494
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2)").WithArguments("(T1, T2)").WithLocation(7, 18),
22497
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2, 3, 4, 5, 6, 7, 8, 9)").WithArguments("(T1, T2)").WithLocation(8, 18),
22500
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2, 3, 4, 5, 6, 7, 8, 9)").WithArguments("System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>").WithLocation(8, 18),
22503
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)").WithArguments("System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>").WithLocation(9, 19),
22506
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2)").WithArguments("(T1, T2)").WithLocation(10, 14),
22509
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, null)").WithArguments("(T1, T2)").WithLocation(11, 14)
22545
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2, 3, 4, 5, 6, 7, 8, 9)").WithArguments("(T1, T2)").WithLocation(6, 18)
CodeGen\UnsafeTests.cs (1)
4797
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "arg").WithArguments("FixableClass.GetPinnableReference()").WithLocation(14, 29)
Emit\CompilationEmitTests.cs (1)
5655
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Y").WithArguments("Y").WithLocation(4, 19).WithWarningAsError(true));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (145)
Attributes\AttributeTests.cs (4)
10155
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M").WithArguments("C.M()").WithLocation(12, 20),
10158
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M").WithArguments("C.M()").WithLocation(13, 24)
10179
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "F").WithArguments("C.F()").WithLocation(7, 35),
11045
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C.M2()").WithLocation(15, 18));
Attributes\AttributeTests_Experimental.cs (7)
401
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "MyAttribute").WithArguments("MyAttribute"),
433
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A").WithArguments("A").WithLocation(14, 5));
464
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "B").WithArguments("BAttribute").WithLocation(4, 2),
470
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "B").WithArguments("BAttribute").WithLocation(14, 2));
498
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A").WithArguments("AAttribute").WithLocation(9, 2),
504
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A").WithArguments("AAttribute").WithLocation(13, 2),
638
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "CB").WithArguments("B").WithLocation(19, 21),
Attributes\AttributeTests_WellKnownAttributes.cs (96)
5875
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "AnotherAttribute").WithArguments("AnotherAttribute").WithLocation(53, 29),
5878
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "G<int, AnotherAttribute>").WithArguments("G<int, AnotherAttribute>").WithLocation(53, 22),
5884
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "SelfReferenceInBase").WithArguments("SelfReferenceInBase").WithLocation(87, 35),
5902
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Mydeleg").WithArguments("Mydeleg").WithLocation(18, 9));
6046
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ObsoleteMethod1()").WithArguments("Test.ObsoleteMethod1()").WithLocation(8, 9),
6055
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ObsoleteMethod5()").WithArguments("Test.ObsoleteMethod5()").WithLocation(11, 9),
6070
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t.Prop2").WithArguments("Test.Prop2.get").WithLocation(20, 18),
6073
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t.Prop3").WithArguments("Test.Prop3.set").WithLocation(24, 9),
6076
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t.Prop4").WithArguments("Test.Prop4.get").WithLocation(26, 18),
6079
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t.Prop4").WithArguments("Test.Prop4.set").WithLocation(27, 9),
6097
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t1[10]").WithArguments("Test.this[int]").WithLocation(39, 18),
6100
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "gt.ObsoleteMethod1<double>()").WithArguments("GenericTest<int>.ObsoleteMethod1<U>()").WithLocation(42, 9),
6169
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "10").WithArguments("Test.implicit operator Test(int)"),
6172
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, @"(Test)""10""").WithArguments("Test.explicit operator Test(string)"),
6175
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "-c").WithArguments("Test.operator -(Test)"),
6178
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c++").WithArguments("Test.operator ++(Test)"),
6181
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c").WithArguments("Test.operator true(Test)"),
6184
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c && c1").WithArguments("Test.operator &(Test, Test)"),
6187
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c && c1").WithArguments("Test.operator true(Test)"),
6190
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c1 += c").WithArguments("Test.operator +(Test, Test)"));
6267
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "TestClass1").WithArguments("TestClass1").WithLocation(4, 29),
6480
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "derived.Boo").WithArguments("Base.Boo.get").WithLocation(26, 7),
6575
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "P2").WithArguments("Test.P2").WithLocation(28, 15),
6653
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "SomeType").WithArguments("SomeType"));
6711
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "SomeType").WithArguments("SomeType").WithLocation(27, 19),
6762
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "C").WithArguments("C"),
6765
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "o.Goo()").WithArguments("C.Goo()"));
7039
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c1[0]").WithArguments("C1.this[int].get").WithLocation(19, 17),
7042
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c2[0]").WithArguments("C2.this[int].set").WithLocation(21, 9));
7108
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C1").WithArguments("A.B.C1"),
7111
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>").WithArguments("A.B.C2<int>"),
7114
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C").WithArguments("A.B.C"),
7117
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C.Field1").WithArguments("A.B.C.Field1"),
7120
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C").WithArguments("A.B.C"),
7123
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C.D").WithArguments("A.B.C.D"),
7126
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C.D.Field2").WithArguments("A.B.C.D.Field2"),
7129
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C1").WithArguments("A.B.C1"),
7132
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>").WithArguments("A.B.C2<int>"),
7135
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>").WithArguments("A.B.C2<int>"),
7138
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>.Field1").WithArguments("A.B.C2<int>.Field1"),
7141
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>").WithArguments("A.B.C2<int>"),
7144
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>.E<int>").WithArguments("A.B.C2<int>.E<int>"));
7337
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A").WithArguments("A").WithLocation(7, 33));
7388
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A").WithArguments("A").WithLocation(11, 24),
7518
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "a.E").WithArguments("A.E"),
7521
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "a.P").WithArguments("A.P"),
7524
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "a.M()").WithArguments("A.M()"),
7527
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.E").WithArguments("A.E"),
7530
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.P").WithArguments("A.P"),
7533
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.M()").WithArguments("A.M()"),
7536
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.E").WithArguments("A.E"),
7539
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.P").WithArguments("A.P"),
7542
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.M()").WithArguments("A.M()"));
7650
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "a.M()").WithArguments("A<int>.M()"),
7653
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.M()").WithArguments("A<int>.M()"),
7656
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.M()").WithArguments("A<char>.M()"));
7692
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.M<int>()").WithArguments("A.M<T>()"));
7763
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("A.P"),
7766
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("A.M()"),
7769
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("A.E"),
7772
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("A.P"),
7775
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("A.M()"),
7778
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("A.E"));
7844
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("A.P"),
7847
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("A.M()"),
7850
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("A.E"),
7853
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("A.P"),
7856
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("A.M()"),
7859
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("A.E"));
7920
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("B.P"),
7923
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("B.M()"),
7926
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("B.E"));
7968
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "public C() { }").WithArguments("B.B()"),
7971
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, ": base()").WithArguments("B.B()"),
7975
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base[1]").WithArguments("B.this[int]"));
8299
Assert.Equal(ErrorCode.
WRN_DeprecatedSymbol
, (ErrorCode)diag.Code);
8336
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C.M1()").WithLocation(12, 9));
8367
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C.M1()").WithLocation(12, 9));
8398
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C.M1()").WithLocation(12, 9));
8554
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C.M2()").WithLocation(16, 9),
8557
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C.M2()").WithLocation(20, 9),
8613
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C1.M2()").WithLocation(7, 9),
8616
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C1.M2()").WithLocation(11, 9),
8757
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
8953
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
9136
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
9187
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
9516
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
13468
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ActiveParent.ObsoleteChild").WithArguments("ActiveParent.ObsoleteChild").WithLocation(3, 14),
13471
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ObsoleteParent").WithArguments("ObsoleteParent").WithLocation(4, 14),
13474
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "BothObsoleteParent").WithArguments("BothObsoleteParent").WithLocation(5, 14),
13477
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "BothObsoleteParent.BothObsoleteChild").WithArguments("BothObsoleteParent.BothObsoleteChild").WithLocation(5, 14));
13678
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Prop").WithArguments("C.Prop").WithLocation(5, 24),
13681
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Prop").WithArguments("C.Prop.set").WithLocation(5, 24),
13684
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Prop").WithArguments("C.Prop").WithLocation(5, 31),
13687
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Prop").WithArguments("C.Prop.get").WithLocation(5, 31));
FieldKeywordTests.cs (4)
1600
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "C.P1").WithArguments("C.P1").WithLocation(15, 13),
1603
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "C.P1").WithArguments("C.P1").WithLocation(17, 9),
1606
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.P3").WithArguments("C.P3").WithLocation(20, 13),
1609
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.P3").WithArguments("C.P3").WithLocation(22, 9));
PartialEventsAndConstructorsTests.cs (7)
3717
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.C()").WithLocation(3, 9),
3720
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C(2)").WithArguments("C.C(int)").WithLocation(4, 5),
3723
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.E").WithArguments("C.E").WithLocation(5, 1),
3726
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.E").WithArguments("C.E").WithLocation(6, 1),
3729
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.G").WithArguments("C.G").WithLocation(9, 1),
3732
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.G").WithArguments("C.G").WithLocation(10, 1),
3738
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M()").WithArguments("C.M()").WithLocation(29, 18),
Semantics\CollectionExpressionTests.cs (5)
12172
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "y").WithArguments("MyCollection.Count").WithLocation(17, 30));
18880
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[]").WithArguments("MyCollectionBuilder").WithLocation(6, 34),
18883
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[1, 2, 3]").WithArguments("MyCollectionBuilder").WithLocation(7, 31));
18971
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[]").WithArguments("MyCollectionBuilder.Create<T>(System.ReadOnlySpan<T>)").WithLocation(6, 34),
18974
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[1, 2, 3]").WithArguments("MyCollectionBuilder.Create<T>(System.ReadOnlySpan<T>)").WithLocation(7, 31));
Semantics\LockTests.cs (5)
908
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "l.EnterScope()").WithArguments("System.Threading.Lock.EnterScope()").WithLocation(6, 8));
943
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Lock").WithArguments("System.Threading.Lock").WithLocation(4, 1));
978
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Scope").WithArguments("System.Threading.Lock.Scope").WithLocation(12, 16),
981
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Scope").WithArguments("System.Threading.Lock.Scope").WithLocation(15, 24));
1016
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "l.EnterScope()").WithArguments("System.Threading.Lock.Scope.Dispose()").WithLocation(6, 8));
Semantics\ParamsCollectionTests.cs (4)
2301
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Test()").WithArguments("MyCollection.MyCollection()").WithLocation(100, 9),
2304
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Test(1)").WithArguments("MyCollection.MyCollection()").WithLocation(101, 9),
2307
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Test(2, 3)").WithArguments("MyCollection.MyCollection()").WithLocation(102, 9),
2310
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "params MyCollection a").WithArguments("MyCollection.MyCollection()").WithLocation(105, 22)
Semantics\PatternMatchingTests_ListPatterns.cs (13)
3485
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[var x]").WithArguments("C.Length").WithLocation(2, 16),
3488
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[var x]").WithArguments("C.Length").WithLocation(2, 16),
3491
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[var x]").WithArguments("C.this[int]").WithLocation(2, 16),
3494
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[.. var y]").WithArguments("C.Length").WithLocation(3, 16),
3497
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[.. var y]").WithArguments("C.Length").WithLocation(3, 16),
3500
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[.. var y]").WithArguments("C.this[int]").WithLocation(3, 16),
3503
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, ".. var y").WithArguments("C.Length").WithLocation(3, 17),
3506
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, ".. var y").WithArguments("C.Slice(int, int)").WithLocation(3, 17),
3509
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C().Slice(0, 0)").WithArguments("C.Slice(int, int)").WithLocation(4, 1),
3512
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()[^1]").WithArguments("C.Length").WithLocation(5, 5),
3515
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()[^1]").WithArguments("C.this[int]").WithLocation(5, 5),
3518
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()[..]").WithArguments("C.Length").WithLocation(6, 5),
3521
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()[..]").WithArguments("C.Slice(int, int)").WithLocation(6, 5)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\ColorColorTests.cs (1)
2183
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Color.Red").WithArguments("Color.Red").WithLocation(11, 29);
Semantics\DeconstructionTests.cs (4)
3887
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.Deconstruct(out int, out int)").WithLocation(6, 27)
6409
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int i, bool c) = x").WithArguments("C.implicit operator bool(C)").WithLocation(4, 1),
6412
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(5, 14),
6415
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(i, c) = new C2()").WithArguments("C.implicit operator bool(C)").WithLocation(6, 1)
Semantics\DynamicTests.cs (1)
4648
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(4, 5)
Semantics\LocalFunctionTests.cs (5)
6033
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "local1()").WithArguments("local1()").WithLocation(8, 9),
6064
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Attr").WithArguments("Attr").WithLocation(12, 10),
6067
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Attr").WithArguments("Attr").WithLocation(13, 18),
6070
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Attr").WithArguments("Attr").WithLocation(14, 22),
6073
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Attr").WithArguments("Attr").WithLocation(15, 22));
Semantics\NullableTests.cs (2)
2125
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(bool?)new S()").WithArguments("S.implicit operator bool(S)").WithLocation(4, 5),
2128
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new S()").WithArguments("S.implicit operator bool(S)").WithLocation(6, 5)
Semantics\SemanticErrorTests.cs (2)
21199
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "MyClass.ObsoleteMethod()").WithArguments("MyClass.ObsoleteMethod()"),
21202
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "MyClass.ObsoleteField").WithArguments("MyClass.ObsoleteField"));
Semantics\TopLevelStatementsTests.cs (1)
4438
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "localI()").WithArguments("localI()").WithLocation(20, 1)
Semantics\UsingDeclarationTests.cs (3)
932
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "C1").WithArguments("C1").WithLocation(34, 15),
935
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "C1").WithArguments("C1").WithLocation(34, 27),
938
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "using S3 S3 = new S3();").WithArguments("S3.Dispose()").WithLocation(40, 9)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Symbols\GenericConstraintTests.cs (3)
6966
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Class2").WithArguments("Class2").WithLocation(12, 27),
6969
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Class2").WithArguments("Class2").WithLocation(18, 28),
6972
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Class2").WithArguments("Class2").WithLocation(30, 36)
Symbols\PartialPropertiesTests.cs (3)
4875
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "VALUE").WithArguments("C.VALUE").WithLocation(5, 44));
4936
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c[1]").WithArguments("C.this[int]").WithLocation(17, 13));
4968
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c[1]").WithArguments("C.this[int].get").WithLocation(15, 13));
Symbols\Source\BaseClassTests.cs (4)
2136
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "CrashTest.Class2").WithArguments("CrashTest.Class2").WithLocation(2, 30),
2139
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "CrashTest.Crash<CrashTest.Class2>").WithArguments("CrashTest.Crash<CrashTest.Class2>").WithLocation(2, 14));
2169
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Crash<T>.AbstractClass").WithArguments("CrashTest.Crash<T>.AbstractClass").WithLocation(11, 18),
2172
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "AbstractClass").WithArguments("CrashTest.Crash<CrashTest.Class2>.AbstractClass").WithLocation(6, 20)