236 references to ERR_DeprecatedSymbolStr
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Crefs.cs (1)
1194
case ErrorCode.
ERR_DeprecatedSymbolStr
:
Errors\ErrorFacts.cs (2)
995
or ErrorCode.
ERR_DeprecatedSymbolStr
2569
case ErrorCode.
ERR_DeprecatedSymbolStr
:
Symbols\ObsoleteAttributeHelpers.cs (2)
213
(message: { }, isError: true, isColInit: false) => ErrorCode.
ERR_DeprecatedSymbolStr
,
231
ErrorCode.
ERR_DeprecatedSymbolStr
or ErrorCode.WRN_DeprecatedCollectionInitAddStr or
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (36)
CodeGen\CodeGenAsyncMainTests.cs (1)
1533
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Task").WithArguments("MyExtensions.GetAwaiter(System.Threading.Tasks.Task)", "test").WithLocation(31, 12));
CodeGen\CodeGenForEachTests.cs (2)
5754
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "foreach").WithArguments("C.MyEnumerator.Dispose()", "error").WithLocation(1, 1));
5784
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..new C()").WithArguments("C.MyEnumerator.Dispose()", "error").WithLocation(1, 16));
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (1)
2638
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new D()").WithArguments("D.implicit operator C(D)", "D is obsolete").WithLocation(8, 15),
CodeGen\CodeGenTupleEqualityTests.cs (24)
2862
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "(new A(), new A()) == (new X(), new Y())").WithArguments("A.operator ==(A, Y)", "obsolete").WithLocation(6, 37),
2865
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "(new A(), new A()) == (new X(), new Y())").WithArguments("A.operator ==(A, Y)", "obsolete").WithLocation(6, 37),
2868
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "(new A(), new A()) != (new X(), new Y())").WithArguments("A.operator !=(A, Y)", "obsolete too").WithLocation(7, 37),
2871
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "(new A(), new A()) != (new X(), new Y())").WithArguments("A.operator !=(A, Y)", "obsolete too").WithLocation(7, 37)
3114
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "nt1").WithArguments("C.implicit operator int(C)", "obsolete").WithLocation(5, 12),
3117
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "nt1").WithArguments("C.implicit operator int(C)", "obsolete").WithLocation(5, 12),
3120
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "nt2").WithArguments("C.implicit operator int(C)", "obsolete").WithLocation(5, 19),
3123
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "nt2").WithArguments("C.implicit operator int(C)", "obsolete").WithLocation(5, 19),
3126
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "nt1").WithArguments("C.implicit operator int(C)", "obsolete").WithLocation(8, 12),
3129
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "nt1").WithArguments("C.implicit operator int(C)", "obsolete").WithLocation(8, 12),
3132
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "nt2").WithArguments("C.implicit operator int(C)", "obsolete").WithLocation(8, 19),
3135
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "nt2").WithArguments("C.implicit operator int(C)", "obsolete").WithLocation(8, 19)
3163
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t == t").WithArguments("NotBool.implicit operator bool(NotBool)", "obsolete").WithLocation(4, 49),
3166
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t == t").WithArguments("NotBool.implicit operator bool(NotBool)", "obsolete").WithLocation(4, 49),
3169
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t != t").WithArguments("NotBool.implicit operator bool(NotBool)", "obsolete").WithLocation(5, 52),
3172
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t != t").WithArguments("NotBool.implicit operator bool(NotBool)", "obsolete").WithLocation(5, 52)
3198
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t == t").WithArguments("A.operator ==(A, A)", "").WithLocation(4, 49),
3201
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t == t").WithArguments("A.operator ==(A, A)", "").WithLocation(4, 49),
3204
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t != t").WithArguments("A.operator !=(A, A)", "").WithLocation(5, 52),
3207
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t != t").WithArguments("A.operator !=(A, A)", "").WithLocation(5, 52)
3238
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t == t").WithArguments("NotBool.operator false(NotBool)", "obsolete").WithLocation(4, 49),
3241
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t == t").WithArguments("NotBool.operator false(NotBool)", "obsolete").WithLocation(4, 49),
3244
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t != t").WithArguments("NotBool.operator true(NotBool)", "obsolete").WithLocation(5, 52),
3247
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "t != t").WithArguments("NotBool.operator true(NotBool)", "obsolete").WithLocation(5, 52)
CodeGen\CodeGenTupleTest.cs (7)
8157
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "((int i, bool c)?)x").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(5, 5),
8160
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new C()").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(6, 27),
8163
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "x").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(10, 5),
8166
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new C()").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(11, 9)
8225
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "((int i, bool c)?)x").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(5, 5),
8228
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "x").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(9, 5)
8270
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "((int i, bool c))x").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(3, 5)
CodeGen\UnsafeTests.cs (1)
5405
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Fixable(1)").WithArguments("Fixable.GetPinnableReference()", "hi").WithLocation(8, 25)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (171)
Attributes\AttributeTests_Experimental.cs (12)
217
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "a.F2()").WithArguments("A.F2()", "").WithLocation(24, 9),
223
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "a.F4()").WithArguments("A.F4()", "").WithLocation(26, 9),
268
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "local2()").WithArguments("local2()", "").WithLocation(8, 9));
313
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "a.F2()").WithArguments("A.F2()", "").WithLocation(24, 9),
319
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "a.F4()").WithArguments("A.F4()", "").WithLocation(26, 9),
566
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "SB").WithArguments("SB", "DB").WithLocation(7, 19),
575
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "SE").WithArguments("SE", "DD").WithLocation(10, 19),
578
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "SF").WithArguments("SF", "OF").WithLocation(11, 19),
590
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "IJ").WithArguments("IJ", "DJ").WithLocation(15, 19),
593
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "IK").WithArguments("IK", "DK").WithLocation(16, 19),
599
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "EN").WithArguments("EN", "ON").WithLocation(18, 19),
605
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "EP").WithArguments("EP", "DP").WithLocation(20, 19));
Attributes\AttributeTests_IsByRefLike.cs (7)
851
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Test.S1").WithArguments("Test.S1", "Types with embedded references are not supported in this version of your compiler.").WithLocation(7, 9),
854
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Test.S2").WithArguments("Test.S2", "Types with embedded references are not supported in this version of your compiler.").WithLocation(8, 9),
917
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Test.S2").WithArguments("Test.S2", "Types with embedded references are not supported in this version of your compiler.").WithLocation(10, 9),
920
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Test.field").WithArguments("Test.field", "Types with embedded references are not supported in this version of your compiler.").WithLocation(13, 17),
932
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Test.S1").WithArguments("Test.S1", "Types with embedded references are not supported in this version of your compiler.").WithLocation(7, 9),
935
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Test.S2").WithArguments("Test.S2", "Types with embedded references are not supported in this version of your compiler.").WithLocation(10, 9),
938
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Test.field").WithArguments("Test.field", "Types with embedded references are not supported in this version of your compiler.").WithLocation(13, 17),
Attributes\AttributeTests_WellKnownAttributes.cs (71)
5881
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Class1").WithArguments("Class1", "Do not use this type").WithLocation(7, 5),
5887
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Class1").WithArguments("Class1", "Do not use this type").WithLocation(6, 5),
5893
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Class1").WithArguments("Class1", "Do not use this type").WithLocation(8, 18),
5896
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Class1").WithArguments("Class1", "Do not use this type").WithLocation(12, 9),
5899
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Class1").WithArguments("Class1", "Do not use this type").WithLocation(16, 23),
6052
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "ObsoleteMethod3()").WithArguments("Test.ObsoleteMethod3()", "").WithLocation(10, 9),
6261
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "TestClass3").WithArguments("TestClass3", "Do not use TestClass3").WithLocation(6, 29),
6276
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "c.field1").WithArguments("TestClass.field1", "Do not use field1").WithLocation(14, 13),
6279
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "c.event1").WithArguments("TestClass.event1", "Do not use event").WithLocation(15, 9),
6282
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "c.event1").WithArguments("TestClass.event1", "Do not use event").WithLocation(16, 9),
6288
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "c.Prop3").WithArguments("TestClass.Prop3.set", "Do not use Prop3.Get").WithLocation(19, 9));
6483
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "derived.Hoo").WithArguments("Base.Hoo.get", "Base.Hoo is Obsolete").WithLocation(28, 13),
6560
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "F2").WithArguments("Test.F2", "F2 is obsolete").WithLocation(15, 15),
6566
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "F4").WithArguments("Test.F4", "blah").WithLocation(18, 15),
6590
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "F7").WithArguments("Test.F7", "F7 is obsolete").WithLocation(43, 15),
6596
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "F7").WithArguments("Test.F7", "F7 is obsolete").WithLocation(45, 15),
6605
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "F7").WithArguments("Test.F7", "F7 is obsolete").WithLocation(40, 15));
6879
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Att").WithArguments("Att.Att()", "Constructor").WithLocation(37, 2),
6882
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Field = 1").WithArguments("Att.Field", "Field").WithLocation(38, 6),
6885
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Att(Field = 1)").WithArguments("Att.Att()", "Constructor").WithLocation(38, 2),
6888
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop = 1").WithArguments("Att.Prop", "Property").WithLocation(39, 6),
6891
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Att(Prop = 1)").WithArguments("Att.Att()", "Constructor").WithLocation(39, 2),
6894
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop2 = 1").WithArguments("Att.Prop2", "Property").WithLocation(40, 6),
6897
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Att(Prop2 = 1)").WithArguments("Att.Att()", "Constructor").WithLocation(40, 2),
6900
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop3 = 1").WithArguments("Att.Prop3.set", "setter").WithLocation(41, 6),
6903
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Att(Prop3 = 1)").WithArguments("Att.Att()", "Constructor").WithLocation(41, 2),
6906
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop4 = 1").WithArguments("Att.Prop4", "Property").WithLocation(42, 6),
6909
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop4 = 1").WithArguments("Att.Prop4.set", "setter").WithLocation(42, 6),
6912
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Att(Prop4 = 1)").WithArguments("Att.Att()", "Constructor").WithLocation(42, 2),
6915
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Att(Prop5 = 1)").WithArguments("Att.Att()", "Constructor").WithLocation(43, 2),
6918
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Att()").WithArguments("Att.Att()", "Constructor").WithLocation(46, 6));
7000
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop = 1").WithArguments("BaseAtt.Prop.set", "setter").WithLocation(59, 13),
7003
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop1 = 1").WithArguments("BaseAtt.Prop1.set", "setter").WithLocation(60, 13),
7006
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop2 = 1").WithArguments("BaseAtt.Prop2.set", "base setter").WithLocation(61, 13));
7197
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "public D() { }").WithArguments("C.C()", "Do not use"),
7200
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, ": base()").WithArguments("C.C()", "Do not use"),
7422
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Z").WithArguments("N.A", "Do not use").WithLocation(12, 22),
7425
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Y").WithArguments("N.A", "Do not use").WithLocation(13, 27),
7428
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "X").WithArguments("N.A", "Do not use").WithLocation(10, 22),
7431
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Y").WithArguments("N.A", "Do not use").WithLocation(11, 22),
7434
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Y").WithArguments("N.A", "Do not use").WithLocation(16, 16),
7437
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Y").WithArguments("N.A", "Do not use").WithLocation(17, 21),
7440
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Z").WithArguments("N.A", "Do not use").WithLocation(18, 16),
7443
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "X").WithArguments("N.A", "Do not use").WithLocation(15, 16));
9855
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Class3").WithArguments("Class3", "Class3 is deprecated.").WithLocation(10, 9),
9858
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Class4").WithArguments("Class4", "Class4 is deprecated.").WithLocation(11, 9),
9861
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "x6.P1").WithArguments("Class6.P1.get", "P1.get is deprecated.").WithLocation(19, 14),
9864
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "x6.P2").WithArguments("Class6.P2.set", "P1.get is deprecated.").WithLocation(22, 9),
9913
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C.F()").WithArguments("C.F()", "Removed").WithLocation(6, 9),
10229
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "i.ExceptionalProp").WithArguments("IExceptionalInterface.ExceptionalProp.set", "Changed my mind; don't put this prop.").WithLocation(8, 9),
10232
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "i.ExceptionalProp").WithArguments("IExceptionalInterface.ExceptionalProp.get", "Actually, don't even use the prop at all.").WithLocation(9, 27)
13403
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "TestError").WithArguments("TestError", "Broken Error Class").WithLocation(3, 14),
13804
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[^1]").WithArguments("C.this[int]", "error").WithLocation(17, 13),
13807
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[^1]").WithArguments("C.Count", "error").WithLocation(17, 13),
13810
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[..]").WithArguments("C.Slice(int, int)", "error").WithLocation(18, 13),
13813
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[..]").WithArguments("C.Count", "error").WithLocation(18, 13)
13851
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[^1]").WithArguments("C.Count.get", "error").WithLocation(23, 13),
13854
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[^1]").WithArguments("C.this[int].get", "error").WithLocation(23, 13),
13857
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[..]").WithArguments("C.Count.get", "error").WithLocation(24, 13),
13860
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[..]").WithArguments("C.Slice(int, int)", "error").WithLocation(24, 13)
13901
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[^1]").WithArguments("C.this[System.Index].get", "error").WithLocation(26, 13),
13904
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "this[..]").WithArguments("C.this[System.Range].get", "error").WithLocation(27, 13)
14059
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "var").WithArguments("var", "error").WithLocation(3, 1),
14087
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "var").WithArguments("Legacy", "error").WithLocation(4, 1),
14090
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "var").WithArguments("Legacy", "error").WithLocation(4, 1)
14122
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "unmanaged").WithArguments("unmanaged", "error").WithLocation(3, 30),
14125
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "notnull").WithArguments("notnull", "error").WithLocation(7, 30),
14171
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "unmanaged").WithArguments("Legacy1", "error").WithLocation(5, 30),
14174
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "unmanaged").WithArguments("Legacy1", "error").WithLocation(5, 30),
14177
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "notnull").WithArguments("Legacy2", "error").WithLocation(9, 30),
14180
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "notnull").WithArguments("Legacy2", "error").WithLocation(9, 30)
Semantics\CollectionExpressionTests.cs (5)
18922
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "MyCollectionBuilder").WithArguments("MyCollectionBuilder", "message 2").WithLocation(5, 27),
18925
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[]").WithArguments("MyCollectionBuilder", "message 2").WithLocation(6, 34),
18928
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[1, 2, 3]").WithArguments("MyCollectionBuilder", "message 2").WithLocation(7, 31));
19017
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[]").WithArguments("MyCollectionBuilder.Create<T>(System.ReadOnlySpan<T>)", "message 4").WithLocation(6, 34),
19020
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[1, 2, 3]").WithArguments("MyCollectionBuilder.Create<T>(System.ReadOnlySpan<T>)", "message 4").WithLocation(7, 31));
Semantics\ExperimentalAttributeTests.cs (10)
222
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "error").WithLocation(1, 1),
326
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "error").WithLocation(1, 1),
355
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "error").WithLocation(1, 1)
2758
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "error").WithLocation(3, 12)
2789
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "error").WithLocation(3, 12)
2849
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "OBSOLETE").WithLocation(3, 12),
2902
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C.Event").WithArguments("C.Event", "OBSOLETE").WithLocation(1, 1)
2931
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C.field").WithArguments("C.field", "OBSOLETE").WithLocation(1, 5)
2961
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C.M()").WithArguments("C.M()", "OBSOLETE").WithLocation(1, 1)
2991
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C.P").WithArguments("C.P", "OBSOLETE").WithLocation(1, 5)
Semantics\ExtensionTests.cs (7)
14269
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new object().Method()").WithArguments("E.extension(object).Method()", "Method is obsolete").WithLocation(1, 1));
18619
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "object.M").WithArguments("E.extension(object).M()", "obsolete").WithLocation(1, 19));
18772
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new object().Property").WithArguments("E.extension(object).Property", "Property is obsolete").WithLocation(1, 5),
18775
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new object().Property").WithArguments("E.extension(object).Property", "Property is obsolete").WithLocation(2, 1));
18798
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "object.Property").WithArguments("E.extension(object).Property", "Property is obsolete").WithLocation(1, 5),
18801
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "object.Property").WithArguments("E.extension(object).Property", "Property is obsolete").WithLocation(2, 1));
18823
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new object().Property").WithArguments("E.extension(object).Property", "Property is obsolete").WithLocation(1, 1));
Semantics\InlineArrayTests.cs (1)
1246
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Length").WithArguments("Buffer.Length", "yes").WithLocation(2, 46)
Semantics\PatternMatchingTests_ListPatterns.cs (51)
1228
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test1.Count", "error3").WithLocation(25, 28),
1231
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test1.Count", "error3").WithLocation(25, 28),
1234
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test1.this[int]", "error2").WithLocation(25, 28),
1237
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test1.Count", "error3").WithLocation(26, 28),
1240
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test1.Count", "error3").WithLocation(26, 28),
1243
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test1.this[int]", "error2").WithLocation(26, 28),
1246
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Test1.Count", "error3").WithLocation(26, 29),
1249
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Test1.Slice(int, int)", "error1").WithLocation(26, 29),
1252
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test2.Length", "error6").WithLocation(27, 28),
1255
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test2.this[System.Index]", "error4").WithLocation(27, 28),
1258
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test2.Length", "error6").WithLocation(28, 28),
1261
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test2.this[System.Index]", "error4").WithLocation(28, 28),
1264
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Test2.this[System.Range]", "error5").WithLocation(28, 29)
1328
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test1.Count.get", "error2").WithLocation(40, 28),
1331
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test1.Count.get", "error2").WithLocation(40, 28),
1334
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test1.this[int].get", "error1").WithLocation(40, 28),
1338
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test1()[^1]").WithArguments("Test1.Count.get", "error2").WithLocation(41, 13),
1341
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test1()[^1]").WithArguments("Test1.this[int].get", "error1").WithLocation(41, 13),
1345
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test1.Count.get", "error2").WithLocation(43, 28),
1348
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test1.Count.get", "error2").WithLocation(43, 28),
1351
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test1.this[int].get", "error1").WithLocation(43, 28),
1354
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Test1.Slice(int, int)", "error1").WithLocation(43, 29),
1357
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Test1.Count.get", "error2").WithLocation(43, 29),
1361
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test1()[..0]").WithArguments("Test1.Slice(int, int)", "error1").WithLocation(44, 13),
1364
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test1()[..0]").WithArguments("Test1.Count.get", "error2").WithLocation(44, 13),
1368
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test2.Length.get", "error5").WithLocation(46, 28),
1371
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Test2.this[System.Index].get", "error3").WithLocation(46, 28),
1375
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test2()[^1]").WithArguments("Test2.this[System.Index].get", "error3").WithLocation(47, 13),
1379
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test2.Length.get", "error5").WithLocation(49, 28),
1382
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Test2.this[System.Index].get", "error3").WithLocation(49, 28),
1385
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Test2.this[System.Range].get", "error4").WithLocation(49, 29),
1389
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test2()[..0]").WithArguments("Test2.this[System.Range].get", "error4").WithLocation(50, 13)
1484
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Base1.Count.get", "error3").WithLocation(73, 28),
1487
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Base1.Count.get", "error3").WithLocation(73, 28),
1490
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Base1.this[int].get", "error2").WithLocation(73, 28),
1494
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Base1.Count.get", "error3").WithLocation(74, 28),
1497
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Base1.Count.get", "error3").WithLocation(74, 28),
1500
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Base1.this[int].get", "error2").WithLocation(74, 28),
1503
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Base1.Count.get", "error3").WithLocation(74, 29),
1506
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Base1.Slice(int, int)", "error1").WithLocation(74, 29),
1510
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Base2.Length.get", "error6").WithLocation(75, 28),
1513
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[0]").WithArguments("Base2.this[System.Index].get", "error4").WithLocation(75, 28),
1517
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Base2.Length.get", "error6").WithLocation(76, 28),
1520
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "[..0]").WithArguments("Base2.this[System.Index].get", "error4").WithLocation(76, 28),
1523
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "..0").WithArguments("Base2.this[System.Range].get", "error5").WithLocation(76, 29),
1527
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test1()[^1]").WithArguments("Base1.Count.get", "error3").WithLocation(78, 13),
1530
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test1()[^1]").WithArguments("Base1.this[int].get", "error2").WithLocation(78, 13),
1534
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test1()[..0]").WithArguments("Base1.Count.get", "error3").WithLocation(79, 13),
1537
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test1()[..0]").WithArguments("Base1.Slice(int, int)", "error1").WithLocation(79, 13),
1541
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test2()[^1]").WithArguments("Base2.this[System.Index].get", "error4").WithLocation(80, 13),
1545
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new Test2()[..0]").WithArguments("Base2.this[System.Range].get", "error5").WithLocation(81, 13)
Semantics\PatternMatchingTests5.cs (3)
1699
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop1").WithArguments("C1.Prop1", "error Prop1").WithLocation(7, 21),
1702
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop2").WithArguments("C2.Prop2", "error Prop2").WithLocation(7, 27)
1742
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "Prop1.Prop2").WithArguments("C1.Prop1.get", "error Prop1").WithLocation(7, 21)
Semantics\PrimaryConstructorTests.cs (4)
3555
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new C()").WithArguments("C.C()", "Obsolete!!!").WithLocation(2, 5)
3604
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new C1()").WithArguments("C1.C1()", "Obsolete!!!").WithLocation(2, 5)
3626
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "Obsolete!!!").WithLocation(2, 9)
3648
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "Obsolete!!!").WithLocation(2, 9)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (13)
Semantics\DeconstructionTests.cs (4)
3909
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new C()").WithArguments("C.Deconstruct(out int, out int)", "Deprecated").WithLocation(6, 27)
6443
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "(int i, bool c) = x").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(4, 1),
6446
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "new C()").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(5, 14),
6449
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "(i, c) = new C2()").WithArguments("C.implicit operator bool(C)", "Obsolete error").WithLocation(6, 1)
Semantics\InterpolationTests.cs (3)
3406
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, @"$""{(object)1}""").WithArguments("System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.DefaultInterpolatedStringHandler(int, int)", "Constructor is obsolete").WithLocation(1, 5)
3434
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "base").WithArguments("System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendLiteral(string)", "AppendLiteral is obsolete").WithLocation(1, 7)
3462
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "{(object)1}").WithArguments("System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendFormatted<T>(T, int, string)", "AppendFormatted is obsolete").WithLocation(1, 11)
Semantics\LocalFunctionTests.cs (1)
6036
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "local2()").WithArguments("local2()", "hello").WithLocation(9, 9));
Semantics\RawInterpolationTests_Handler.cs (3)
1774
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, @"$""""""{(object)1}""""""").WithArguments("System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.DefaultInterpolatedStringHandler(int, int)", "Constructor is obsolete").WithLocation(1, 5));
1801
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "base").WithArguments("System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendLiteral(string)", "AppendLiteral is obsolete").WithLocation(1, 9));
1828
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "{(object)1}").WithArguments("System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendFormatted<T>(T, int, string)", "AppendFormatted is obsolete").WithLocation(1, 13));
Semantics\SemanticErrorTests.cs (1)
11592
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "I1").WithArguments("a.I1", "Obsolescence message")
Semantics\TargetTypedConditionalOperatorTests.cs (1)
144
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "GetD()").WithArguments("D.implicit operator X(D)", "D").WithLocation(6, 28)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Symbols\SymbolErrorTests.cs (7)
21903
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C1").WithArguments("C1", "Error").WithLocation(2, 35),
21953
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C1").WithArguments("C1", "Error").WithLocation(6, 35),
22000
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C1").WithArguments("C1", "Error").WithLocation(2, 35),
22009
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C1").WithArguments("C1", "Error").WithLocation(2, 35),
22064
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C1").WithArguments("C1", "Error").WithLocation(4, 33),
22073
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C1").WithArguments("C1", "Error").WithLocation(7, 25),
22082
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C1").WithArguments("C1", "Error").WithLocation(9, 29),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Parsing\UsingDirectiveParsingTests.cs (4)
3639
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "X").WithArguments("C", "").WithLocation(11, 5),
3645
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "").WithLocation(12, 5),
3789
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "X").WithArguments("C", "").WithLocation(11, 5),
3795
Diagnostic(ErrorCode.
ERR_DeprecatedSymbolStr
, "C").WithArguments("C", "").WithLocation(12, 5),