206 references to WRN_DeprecatedSymbol
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (2)
323
case ErrorCode.
WRN_DeprecatedSymbol
:
929
case ErrorCode.
WRN_DeprecatedSymbol
:
Generated\ErrorFacts.Generated.cs (1)
45
case ErrorCode.
WRN_DeprecatedSymbol
:
Symbols\ObsoleteAttributeHelpers.cs (2)
172
(message: null, isError: _, isColInit: false) => ErrorCode.
WRN_DeprecatedSymbol
,
191
ErrorCode.
WRN_DeprecatedSymbol
or ErrorCode.ERR_DeprecatedCollectionInitAddStr or
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (54)
BreakingChanges.cs (1)
1402
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ObsoleteType").WithArguments("ObsoleteType"));
CodeGen\CodeGenAwaitForeachTests.cs (9)
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)
4005
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.GetAsyncEnumerator(System.Threading.CancellationToken)").WithLocation(7, 15),
4008
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.AsyncEnumerator.MoveNextAsync()").WithLocation(7, 15),
4011
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.AsyncEnumerator.Current").WithLocation(7, 15)
7638
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("Extensions.GetAsyncEnumerator(C)").WithLocation(8, 15),
7641
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.MoveNextAsync()").WithLocation(8, 15),
7644
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.Current").WithLocation(8, 15)
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 (3)
4811
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("Extensions.GetEnumerator(C)").WithLocation(7, 9),
4814
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.MoveNext()").WithLocation(7, 9),
4817
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "foreach").WithArguments("C.Enumerator.Current").WithLocation(7, 9));
CodeGen\CodeGenTupleTest.cs (37)
8085
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "((int i, bool c))x").WithArguments("C.implicit operator bool(C)").WithLocation(5, 5),
8088
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(6, 26),
8091
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "x").WithArguments("C.implicit operator bool(C)").WithLocation(10, 5),
8094
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(11, 9)
8124
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "((int i, bool c)?)x").WithArguments("C.implicit operator bool(C)").WithLocation(5, 5),
8127
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(6, 27),
8130
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "x").WithArguments("C.implicit operator bool(C)").WithLocation(10, 5),
8133
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(11, 9)
8200
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "((int i, bool c)?)x").WithArguments("C.implicit operator bool(C)").WithLocation(5, 5),
8203
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "x").WithArguments("C.implicit operator bool(C)").WithLocation(9, 5)
8255
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "((int i, bool c))x").WithArguments("C.implicit operator bool(C)").WithLocation(3, 5)
13146
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int)").WithArguments("(T1, T2)").WithLocation(8, 19),
13149
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int)").WithArguments("(int, int)").WithLocation(8, 19),
13152
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int, int, int, int, int, int, int, int)").WithArguments("(T1, T2)").WithLocation(13, 12),
13155
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int a, int b)").WithArguments("(T1, T2)").WithLocation(23, 12),
13158
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int a, int b)").WithArguments("(int a, int b)").WithLocation(23, 12),
13164
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),
13173
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(101, 102)").WithArguments("(T1, T2)").WithLocation(10, 16),
13176
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 1, 1, 1, 1, 1, 1, 1, 1)").WithArguments("(T1, T2)").WithLocation(15, 16),
13179
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 1)").WithArguments("(T1, T2)").WithLocation(25, 16),
13182
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().Item1").WithArguments("(int, int).Item1").WithLocation(30, 34),
13185
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().Item20").WithArguments("(int, int).Item20").WithLocation(31, 34),
13188
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M102().a").WithArguments("(int a, int b).a").WithLocation(32, 34),
13191
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 1, 1, 1, 1, 1, 1, 1, 1)").WithArguments("(T1, T2)").WithLocation(37, 16),
13194
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().M2()").WithArguments("(int, int).M2()").WithLocation(98, 9),
13197
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().P2").WithArguments("(int, int).P2").WithLocation(99, 17),
13200
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M10().E2").WithArguments("(int, int).E2").WithLocation(100, 9),
22517
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int)").WithArguments("(T1, T2)").WithLocation(6, 9),
22520
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int, int)").WithArguments("(int, int)").WithLocation(6, 9),
22523
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2)").WithArguments("(T1, T2)").WithLocation(6, 25),
22526
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2)").WithArguments("(T1, T2)").WithLocation(7, 18),
22529
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2, 3, 4, 5, 6, 7, 8, 9)").WithArguments("(T1, T2)").WithLocation(8, 18),
22532
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),
22535
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),
22538
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2)").WithArguments("(T1, T2)").WithLocation(10, 14),
22541
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, null)").WithArguments("(T1, T2)").WithLocation(11, 14)
22577
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(1, 2, 3, 4, 5, 6, 7, 8, 9)").WithArguments("(T1, T2)").WithLocation(6, 18)
CodeGen\UnsafeTests.cs (1)
4658
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "arg").WithArguments("FixableClass.GetPinnableReference()").WithLocation(14, 29)
Emit\CompilationEmitTests.cs (1)
5649
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Y").WithArguments("Y").WithLocation(4, 19).WithWarningAsError(true));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (121)
Attributes\AttributeTests.cs (4)
9855
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M").WithArguments("C.M()").WithLocation(12, 20),
9858
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M").WithArguments("C.M()").WithLocation(13, 24)
9879
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "F").WithArguments("C.F()").WithLocation(7, 35),
10745
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 (97)
5786
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "AnotherAttribute").WithArguments("AnotherAttribute").WithLocation(53, 29),
5789
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "G<int, AnotherAttribute>").WithArguments("G<int, AnotherAttribute>").WithLocation(53, 22),
5795
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "SelfReferenceInBase").WithArguments("SelfReferenceInBase").WithLocation(87, 35),
5813
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Mydeleg").WithArguments("Mydeleg").WithLocation(18, 9));
5957
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ObsoleteMethod1()").WithArguments("Test.ObsoleteMethod1()").WithLocation(8, 9),
5966
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ObsoleteMethod5()").WithArguments("Test.ObsoleteMethod5()").WithLocation(11, 9),
5981
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t.Prop2").WithArguments("Test.Prop2.get").WithLocation(20, 18),
5984
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t.Prop3").WithArguments("Test.Prop3.set").WithLocation(24, 9),
5987
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t.Prop4").WithArguments("Test.Prop4.get").WithLocation(26, 18),
5990
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t.Prop4").WithArguments("Test.Prop4.set").WithLocation(27, 9),
6008
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "t1[10]").WithArguments("Test.this[int]").WithLocation(39, 18),
6011
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "gt.ObsoleteMethod1<double>()").WithArguments("GenericTest<int>.ObsoleteMethod1<U>()").WithLocation(42, 9),
6080
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "10").WithArguments("Test.implicit operator Test(int)"),
6083
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, @"(Test)""10""").WithArguments("Test.explicit operator Test(string)"),
6086
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "-c").WithArguments("Test.operator -(Test)"),
6089
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c++").WithArguments("Test.operator ++(Test)"),
6092
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c").WithArguments("Test.operator true(Test)"),
6095
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c && c1").WithArguments("Test.operator &(Test, Test)"),
6098
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c && c1").WithArguments("Test.operator true(Test)"),
6101
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c1 += c").WithArguments("Test.operator +(Test, Test)"));
6178
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "TestClass1").WithArguments("TestClass1").WithLocation(4, 29),
6391
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "derived.Boo").WithArguments("Base.Boo.get").WithLocation(26, 7),
6486
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "P2").WithArguments("Test.P2").WithLocation(28, 15),
6498
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Method2").WithArguments("Test.Method2()").WithLocation(35, 16),
6567
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "SomeType").WithArguments("SomeType"));
6625
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "SomeType").WithArguments("SomeType").WithLocation(27, 19),
6676
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "C").WithArguments("C"),
6679
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "o.Goo()").WithArguments("C.Goo()"));
6953
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c1[0]").WithArguments("C1.this[int].get").WithLocation(19, 17),
6956
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c2[0]").WithArguments("C2.this[int].set").WithLocation(21, 9));
7022
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C1").WithArguments("A.B.C1"),
7025
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>").WithArguments("A.B.C2<int>"),
7028
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C").WithArguments("A.B.C"),
7031
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C.Field1").WithArguments("A.B.C.Field1"),
7034
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C").WithArguments("A.B.C"),
7037
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C.D").WithArguments("A.B.C.D"),
7040
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C.D.Field2").WithArguments("A.B.C.D.Field2"),
7043
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C1").WithArguments("A.B.C1"),
7046
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>").WithArguments("A.B.C2<int>"),
7049
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>").WithArguments("A.B.C2<int>"),
7052
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>.Field1").WithArguments("A.B.C2<int>.Field1"),
7055
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>").WithArguments("A.B.C2<int>"),
7058
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A.B.C2<int>.E<int>").WithArguments("A.B.C2<int>.E<int>"));
7251
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A").WithArguments("A").WithLocation(7, 33));
7302
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "A").WithArguments("A").WithLocation(11, 24),
7432
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "a.E").WithArguments("A.E"),
7435
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "a.P").WithArguments("A.P"),
7438
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "a.M()").WithArguments("A.M()"),
7441
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.E").WithArguments("A.E"),
7444
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.P").WithArguments("A.P"),
7447
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.M()").WithArguments("A.M()"),
7450
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.E").WithArguments("A.E"),
7453
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.P").WithArguments("A.P"),
7456
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.M()").WithArguments("A.M()"));
7564
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "a.M()").WithArguments("A<int>.M()"),
7567
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.M()").WithArguments("A<int>.M()"),
7570
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "c.M()").WithArguments("A<char>.M()"));
7606
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "b.M<int>()").WithArguments("A.M<T>()"));
7677
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("A.P"),
7680
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("A.M()"),
7683
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("A.E"),
7686
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("A.P"),
7689
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("A.M()"),
7692
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("A.E"));
7758
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("A.P"),
7761
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("A.M()"),
7764
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("A.E"),
7767
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("A.P"),
7770
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("A.M()"),
7773
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("A.E"));
7834
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.P").WithArguments("B.P"),
7837
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.M()").WithArguments("B.M()"),
7840
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base.E").WithArguments("B.E"));
7882
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "public C() { }").WithArguments("B.B()"),
7885
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, ": base()").WithArguments("B.B()"),
7889
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "base[1]").WithArguments("B.this[int]"));
8213
Assert.Equal(ErrorCode.
WRN_DeprecatedSymbol
, (ErrorCode)diag.Code);
8250
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C.M1()").WithLocation(12, 9));
8281
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C.M1()").WithLocation(12, 9));
8312
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C.M1()").WithLocation(12, 9));
8468
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C.M2()").WithLocation(16, 9),
8471
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C.M2()").WithLocation(20, 9),
8527
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C1.M2()").WithLocation(7, 9),
8530
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M2()").WithArguments("C1.M2()").WithLocation(11, 9),
8671
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
8867
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
9050
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
9101
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
9430
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "M1()").WithArguments("C1.M1()").WithLocation(6, 9));
13292
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ActiveParent.ObsoleteChild").WithArguments("ActiveParent.ObsoleteChild").WithLocation(3, 14),
13295
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "ObsoleteParent").WithArguments("ObsoleteParent").WithLocation(4, 14),
13298
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "BothObsoleteParent").WithArguments("BothObsoleteParent").WithLocation(5, 14),
13301
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "BothObsoleteParent.BothObsoleteChild").WithArguments("BothObsoleteParent.BothObsoleteChild").WithLocation(5, 14));
13502
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Prop").WithArguments("C.Prop").WithLocation(5, 24),
13505
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Prop").WithArguments("C.Prop.set").WithLocation(5, 24),
13508
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Prop").WithArguments("C.Prop").WithLocation(5, 31),
13511
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Prop").WithArguments("C.Prop.get").WithLocation(5, 31));
Semantics\PatternMatchingTests_ListPatterns.cs (13)
3487
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[var x]").WithArguments("C.Length").WithLocation(2, 16),
3490
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[var x]").WithArguments("C.Length").WithLocation(2, 16),
3493
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[var x]").WithArguments("C.this[int]").WithLocation(2, 16),
3496
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[.. var y]").WithArguments("C.Length").WithLocation(3, 16),
3499
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[.. var y]").WithArguments("C.Length").WithLocation(3, 16),
3502
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "[.. var y]").WithArguments("C.this[int]").WithLocation(3, 16),
3505
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, ".. var y").WithArguments("C.Length").WithLocation(3, 17),
3508
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, ".. var y").WithArguments("C.Slice(int, int)").WithLocation(3, 17),
3511
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C().Slice(0, 0)").WithArguments("C.Slice(int, int)").WithLocation(4, 1),
3514
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()[^1]").WithArguments("C.Length").WithLocation(5, 5),
3517
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()[^1]").WithArguments("C.this[int]").WithLocation(5, 5),
3520
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()[..]").WithArguments("C.Length").WithLocation(6, 5),
3523
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()[..]").WithArguments("C.Slice(int, int)").WithLocation(6, 5)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\ColorColorTests.cs (1)
2182
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)
6412
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(int i, bool c) = x").WithArguments("C.implicit operator bool(C)").WithLocation(4, 1),
6415
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(5, 14),
6418
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(i, c) = new C2()").WithArguments("C.implicit operator bool(C)").WithLocation(6, 1)
Semantics\DynamicTests.cs (1)
4318
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new C()").WithArguments("C.implicit operator bool(C)").WithLocation(4, 5)
Semantics\LocalFunctionTests.cs (5)
5949
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "local1()").WithArguments("local1()").WithLocation(8, 9),
5980
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Attr").WithArguments("Attr").WithLocation(12, 10),
5983
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Attr").WithArguments("Attr").WithLocation(13, 18),
5986
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Attr").WithArguments("Attr").WithLocation(14, 22),
5989
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Attr").WithArguments("Attr").WithLocation(15, 22));
Semantics\NullableTests.cs (2)
2129
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "(bool?)new S()").WithArguments("S.implicit operator bool(S)").WithLocation(4, 5),
2132
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "new S()").WithArguments("S.implicit operator bool(S)").WithLocation(6, 5)
Semantics\SemanticErrorTests.cs (2)
20975
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "MyClass.ObsoleteMethod()").WithArguments("MyClass.ObsoleteMethod()"),
20978
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "MyClass.ObsoleteField").WithArguments("MyClass.ObsoleteField"));
Semantics\TopLevelStatementsTests.cs (1)
4425
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "localI()").WithArguments("localI()").WithLocation(20, 1)
Semantics\UsingDeclarationTests.cs (3)
929
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "C1").WithArguments("C1").WithLocation(34, 15),
932
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "C1").WithArguments("C1").WithLocation(34, 27),
935
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "using S3 S3 = new S3();").WithArguments("S3.Dispose()").WithLocation(40, 9)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Symbols\GenericConstraintTests.cs (3)
6939
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Class2").WithArguments("Class2").WithLocation(12, 27),
6942
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Class2").WithArguments("Class2").WithLocation(18, 28),
6945
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Class2").WithArguments("Class2").WithLocation(30, 36)
Symbols\Source\BaseClassTests.cs (4)
2135
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "CrashTest.Class2").WithArguments("CrashTest.Class2").WithLocation(2, 30),
2138
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "CrashTest.Crash<CrashTest.Class2>").WithArguments("CrashTest.Crash<CrashTest.Class2>").WithLocation(2, 14));
2168
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "Crash<T>.AbstractClass").WithArguments("CrashTest.Crash<T>.AbstractClass").WithLocation(11, 18),
2171
Diagnostic(ErrorCode.
WRN_DeprecatedSymbol
, "AbstractClass").WithArguments("CrashTest.Crash<CrashTest.Class2>.AbstractClass").WithLocation(6, 20)