173 references to WRN_AccessorDoesNotUseBackingField
Microsoft.CodeAnalysis.CSharp (4)
Errors\ErrorFacts.cs (2)
571
case ErrorCode.
WRN_AccessorDoesNotUseBackingField
:
2478
or ErrorCode.
WRN_AccessorDoesNotUseBackingField
Generated\ErrorFacts.Generated.cs (1)
344
case ErrorCode.
WRN_AccessorDoesNotUseBackingField
:
Symbols\Source\SourcePropertySymbolBase.cs (1)
354
diagnostics.Add(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, accessorToBlame.GetFirstLocation(), accessorName, property);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (154)
FieldKeywordTests.cs (154)
222
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(6, 9),
225
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(13, 9));
252
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(6, 9),
255
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(13, 9));
284
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(7, 9),
287
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(15, 9));
331
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(8, 9),
334
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P3").WithLocation(22, 9));
366
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "ReadonlyC1.Prop").WithLocation(8, 31),
369
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "ReadonlyC3.Prop").WithLocation(18, 26));
390
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P").WithLocation(6, 9),
413
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P").WithLocation(5, 9),
446
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P").WithLocation(6, 9),
1129
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, useInit ? "init" : "set").WithArguments(useInit ? "init" : "set", "I.Q3").WithLocation(5, 22),
1135
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.Q4").WithLocation(6, 17));
1440
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.P1").WithLocation(8, 49),
1443
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(9, 17),
1455
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P3").WithLocation(14, 49));
1535
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q2").WithLocation(20, 81),
1538
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "B.Q3").WithLocation(21, 60),
1547
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q5").WithLocation(23, 67));
1713
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P1").WithLocation(5, 63),
1716
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(6, 63),
1719
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P3").WithLocation(7, 56),
1722
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(8, 56),
1771
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28));
1863
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28));
1927
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 21));
2035
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 21));
2142
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(8, 21),
2268
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P4").WithLocation(7, 42),
2271
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(8, 28),
2274
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P7").WithLocation(10, 33));
2341
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "I.P4").WithLocation(6, 35),
2347
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(7, 21),
2353
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "I.P7").WithLocation(9, 26),
2478
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(7, 42),
2481
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28),
2484
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P7").WithLocation(10, 33));
2607
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C4.P4").WithLocation(27, 35),
2610
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C5.P5").WithLocation(34, 21),
2613
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C7.P7").WithLocation(48, 26));
3931
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P5").WithLocation(6, 50),
3934
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P7").WithLocation(7, 41),
3984
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P5").WithLocation(8, 43),
3987
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "A.P6").WithLocation(9, 43),
3990
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P7").WithLocation(10, 34),
3993
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "A.P8").WithLocation(11, 34),
4101
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(7, 42));
4691
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.P4").WithLocation(6, 40),
4694
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4697
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4700
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.PA").WithLocation(12, 31));
4710
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4716
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4719
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4725
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31),
4741
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4747
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4750
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4756
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31),
4769
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4772
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4775
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4778
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31));
4830
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4836
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4839
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4845
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
4861
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4867
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4873
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4882
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
4895
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4898
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4901
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4904
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40));
4914
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4917
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4923
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4929
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
5159
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.Q4").WithLocation(11, 31),
5168
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.Q5").WithLocation(12, 49));
5202
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.Q4").WithLocation(11, 31),
5208
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.Q5").WithLocation(12, 49));
5402
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 48),
5411
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.P6").WithLocation(8, 48),
5420
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 30),
5429
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P9").WithLocation(11, 30),
5438
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PC").WithLocation(12, 30),
5447
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PD").WithLocation(13, 30),
5468
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PG").WithLocation(16, 35),
5477
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.PH").WithLocation(17, 35),
5535
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(6, 55),
5544
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(8, 37),
5553
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PC").WithLocation(9, 37),
5568
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PG").WithLocation(11, 42),
5603
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 55));
5623
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 54));
5643
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 51));
5670
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 40),
7700
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P13").WithLocation(8, 30),
7703
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P23").WithLocation(12, 39),
7706
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P32").WithLocation(15, 25),
7709
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P34").WithLocation(17, 25),
7712
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P43").WithLocation(20, 47),
7715
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P52").WithLocation(23, 25),
7718
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P54").WithLocation(25, 25));
7790
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(3, 47),
7793
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(4, 47),
7805
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(5, 47));
7923
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(3, 47),
7926
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(4, 47),
7935
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(5, 47));
8040
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(21, 42),
8043
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(22, 42),
8046
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(23, 42));
8245
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.Q2").WithLocation(8, 44));
8732
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P1").WithLocation(3, 30),
8738
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P2").WithLocation(4, 25));
8798
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P1").WithLocation(3, 37),
8801
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P2").WithLocation(4, 32));
8987
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P4").WithLocation(6, 32));
9006
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P4").WithLocation(6, 32));
9369
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P7").WithLocation(9, 39),
9372
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.Q7").WithLocation(16, 39));
9749
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9752
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9755
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9758
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9761
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48));
9782
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9788
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9791
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9800
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9803
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48),
9833
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9839
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9842
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9851
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9854
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48),
9869
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9872
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9875
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9878
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9881
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48));
9948
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(4, 32),
10022
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(4, 32),
10031
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P4").WithLocation(6, 32),
10096
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.P2").WithLocation(4, 50),
10099
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P3").WithLocation(5, 36),
10105
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q2").WithLocation(7, 50),
10108
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.Q3").WithLocation(8, 36));
10977
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.Prop").WithLocation(5, 26));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (13)
Symbols\DefaultInterfaceImplementationTests.cs (6)
3381
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I1.P1").WithLocation(6, 9));
3401
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I1.P1").WithLocation(6, 9));
3472
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I1.P1").WithLocation(6, 9));
3540
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I1.P1").WithLocation(7, 9));
3560
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I1.P1").WithLocation(7, 9));
3627
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I1.P1").WithLocation(7, 9));
Symbols\PartialPropertiesTests.cs (3)
1526
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(11, 30),
5383
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.Prop1").WithLocation(4, 32),
5386
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.Prop2").WithLocation(7, 37));
Symbols\SymbolErrorTests.cs (4)
8146
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P").WithLocation(3, 25),
8149
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.Q").WithLocation(4, 20),
8157
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P").WithLocation(3, 25),
8160
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.Q").WithLocation(4, 20),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Diagnostics\DiagnosticTest.cs (1)
439
case ErrorCode.
WRN_AccessorDoesNotUseBackingField
:
Syntax\FieldAndValueKeywordTests.cs (1)
906
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P").WithLocation(5, 9),