171 references to WRN_AccessorDoesNotUseBackingField
Microsoft.CodeAnalysis.CSharp (4)
Errors\ErrorFacts.cs (2)
572
case ErrorCode.
WRN_AccessorDoesNotUseBackingField
:
2480
or ErrorCode.
WRN_AccessorDoesNotUseBackingField
Generated\ErrorFacts.Generated.cs (1)
345
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)
221
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(6, 9),
224
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(13, 9));
251
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(6, 9),
254
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(13, 9));
283
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(7, 9),
286
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(15, 9));
330
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P1").WithLocation(8, 9),
333
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P3").WithLocation(22, 9));
365
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "ReadonlyC1.Prop").WithLocation(8, 31),
368
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "ReadonlyC3.Prop").WithLocation(18, 26));
389
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P").WithLocation(6, 9),
412
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P").WithLocation(5, 9),
445
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P").WithLocation(6, 9),
1004
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, useInit ? "init" : "set").WithArguments(useInit ? "init" : "set", "I.Q3").WithLocation(5, 22),
1010
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.Q4").WithLocation(6, 17));
1315
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.P1").WithLocation(8, 49),
1318
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(9, 17),
1330
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P3").WithLocation(14, 49));
1410
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q2").WithLocation(20, 81),
1413
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "B.Q3").WithLocation(21, 60),
1422
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q5").WithLocation(23, 67));
1588
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P1").WithLocation(5, 63),
1591
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(6, 63),
1594
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P3").WithLocation(7, 56),
1597
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(8, 56),
1646
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28));
1738
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28));
1802
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 21));
1910
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 21));
2017
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(8, 21),
2143
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P4").WithLocation(7, 42),
2146
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(8, 28),
2149
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P7").WithLocation(10, 33));
2216
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "I.P4").WithLocation(6, 35),
2222
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(7, 21),
2228
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "I.P7").WithLocation(9, 26),
2353
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(7, 42),
2356
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28),
2359
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P7").WithLocation(10, 33));
2482
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C4.P4").WithLocation(27, 35),
2485
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C5.P5").WithLocation(34, 21),
2488
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C7.P7").WithLocation(48, 26));
3806
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P5").WithLocation(6, 50),
3809
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P7").WithLocation(7, 41),
3859
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P5").WithLocation(8, 43),
3862
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "A.P6").WithLocation(9, 43),
3865
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P7").WithLocation(10, 34),
3868
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "A.P8").WithLocation(11, 34),
3976
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(7, 42));
4566
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.P4").WithLocation(6, 40),
4569
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4572
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4575
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.PA").WithLocation(12, 31));
4585
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4591
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4594
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4600
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31),
4616
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4622
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4625
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4631
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31),
4644
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4647
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4650
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4653
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31));
4705
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4711
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4714
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4720
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
4736
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4742
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4748
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4757
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
4770
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4773
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4776
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4779
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40));
4789
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4792
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4798
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4804
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
5034
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.Q4").WithLocation(11, 31),
5043
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.Q5").WithLocation(12, 49));
5077
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.Q4").WithLocation(11, 31),
5083
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.Q5").WithLocation(12, 49));
5277
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 48),
5286
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.P6").WithLocation(8, 48),
5295
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 30),
5304
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P9").WithLocation(11, 30),
5313
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PC").WithLocation(12, 30),
5322
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PD").WithLocation(13, 30),
5343
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PG").WithLocation(16, 35),
5352
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.PH").WithLocation(17, 35),
5410
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(6, 55),
5419
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(8, 37),
5428
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PC").WithLocation(9, 37),
5443
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PG").WithLocation(11, 42),
5478
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 55));
5498
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 54));
5518
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 51));
5545
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 40),
7575
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P13").WithLocation(8, 30),
7578
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P23").WithLocation(12, 39),
7581
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P32").WithLocation(15, 25),
7584
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P34").WithLocation(17, 25),
7587
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P43").WithLocation(20, 47),
7590
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P52").WithLocation(23, 25),
7593
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P54").WithLocation(25, 25));
7665
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(3, 47),
7668
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(4, 47),
7680
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(5, 47));
7798
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(3, 47),
7801
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(4, 47),
7810
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(5, 47));
7915
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(21, 42),
7918
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(22, 42),
7921
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(23, 42));
8120
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.Q2").WithLocation(8, 44));
8607
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P1").WithLocation(3, 30),
8613
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P2").WithLocation(4, 25));
8673
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P1").WithLocation(3, 37),
8676
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P2").WithLocation(4, 32));
8862
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P4").WithLocation(6, 32));
8881
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P4").WithLocation(6, 32));
9244
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P7").WithLocation(9, 39),
9247
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.Q7").WithLocation(16, 39));
9624
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9627
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9630
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9633
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9636
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48));
9657
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9663
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9666
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9675
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9678
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48),
9708
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9714
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9717
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9726
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9729
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48),
9744
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9747
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9750
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9753
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9756
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48));
9823
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(4, 32),
9897
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(4, 32),
9906
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P4").WithLocation(6, 32),
9971
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.P2").WithLocation(4, 50),
9974
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P3").WithLocation(5, 36),
9980
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q2").WithLocation(7, 50),
9983
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.Q3").WithLocation(8, 36));
10852
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.Prop").WithLocation(5, 26));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Symbols\DefaultInterfaceImplementationTests.cs (6)
3376
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I1.P1").WithLocation(6, 9));
3396
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I1.P1").WithLocation(6, 9));
3465
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I1.P1").WithLocation(6, 9));
3531
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I1.P1").WithLocation(7, 9));
3551
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I1.P1").WithLocation(7, 9));
3616
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 (2)
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),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Diagnostics\DiagnosticTest.cs (1)
439
case ErrorCode.
WRN_AccessorDoesNotUseBackingField
:
Syntax\FieldAndValueKeywordTests.cs (1)
903
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P").WithLocation(5, 9),