173 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)
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),
1005
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, useInit ? "init" : "set").WithArguments(useInit ? "init" : "set", "I.Q3").WithLocation(5, 22),
1011
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.Q4").WithLocation(6, 17));
1316
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.P1").WithLocation(8, 49),
1319
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(9, 17),
1331
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P3").WithLocation(14, 49));
1411
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q2").WithLocation(20, 81),
1414
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "B.Q3").WithLocation(21, 60),
1423
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q5").WithLocation(23, 67));
1589
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P1").WithLocation(5, 63),
1592
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P2").WithLocation(6, 63),
1595
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P3").WithLocation(7, 56),
1598
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(8, 56),
1647
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28));
1739
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28));
1803
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 21));
1911
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 21));
2018
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(8, 21),
2144
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P4").WithLocation(7, 42),
2147
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(8, 28),
2150
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P7").WithLocation(10, 33));
2217
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "I.P4").WithLocation(6, 35),
2223
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P5").WithLocation(7, 21),
2229
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "I.P7").WithLocation(9, 26),
2354
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(7, 42),
2357
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P5").WithLocation(8, 28),
2360
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P7").WithLocation(10, 33));
2483
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C4.P4").WithLocation(27, 35),
2486
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C5.P5").WithLocation(34, 21),
2489
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C7.P7").WithLocation(48, 26));
3807
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P5").WithLocation(6, 50),
3810
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P7").WithLocation(7, 41),
3860
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P5").WithLocation(8, 43),
3863
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "A.P6").WithLocation(9, 43),
3866
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "A.P7").WithLocation(10, 34),
3869
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "A.P8").WithLocation(11, 34),
3977
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.P4").WithLocation(7, 42));
4567
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.P4").WithLocation(6, 40),
4570
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4573
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4576
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.PA").WithLocation(12, 31));
4586
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4592
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4595
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4601
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31),
4617
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4623
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4626
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4632
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31),
4645
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(6, 40),
4648
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(8, 26),
4651
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 26),
4654
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(12, 31));
4706
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4712
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4715
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4721
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
4737
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4743
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4749
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4758
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
4771
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4774
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4777
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4780
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40));
4790
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P4").WithLocation(4, 49),
4793
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P6").WithLocation(5, 26),
4799
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(7, 26),
4805
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PA").WithLocation(9, 40),
5035
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.Q4").WithLocation(11, 31),
5044
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.Q5").WithLocation(12, 49));
5078
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.Q4").WithLocation(11, 31),
5084
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.Q5").WithLocation(12, 49));
5278
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 48),
5287
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.P6").WithLocation(8, 48),
5296
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(10, 30),
5305
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P9").WithLocation(11, 30),
5314
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PC").WithLocation(12, 30),
5323
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PD").WithLocation(13, 30),
5344
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PG").WithLocation(16, 35),
5353
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "init").WithArguments("init", "S.PH").WithLocation(17, 35),
5411
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(6, 55),
5420
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.P8").WithLocation(8, 37),
5429
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "S.PC").WithLocation(9, 37),
5444
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.PG").WithLocation(11, 42),
5479
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 55));
5499
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 54));
5519
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 51));
5546
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P3").WithLocation(5, 40),
7576
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P13").WithLocation(8, 30),
7579
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P23").WithLocation(12, 39),
7582
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P32").WithLocation(15, 25),
7585
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P34").WithLocation(17, 25),
7588
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "C.P43").WithLocation(20, 47),
7591
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P52").WithLocation(23, 25),
7594
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P54").WithLocation(25, 25));
7666
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(3, 47),
7669
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(4, 47),
7681
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(5, 47));
7799
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(3, 47),
7802
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(4, 47),
7811
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(5, 47));
7916
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P1").WithLocation(21, 42),
7919
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P2").WithLocation(22, 42),
7922
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, setter).WithArguments(setter, "B2.P3").WithLocation(23, 42));
8121
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "C.Q2").WithLocation(8, 44));
8608
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P1").WithLocation(3, 30),
8614
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P2").WithLocation(4, 25));
8674
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "I.P1").WithLocation(3, 37),
8677
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P2").WithLocation(4, 32));
8863
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P4").WithLocation(6, 32));
8882
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "I.P4").WithLocation(6, 32));
9245
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.P7").WithLocation(9, 39),
9248
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "C.Q7").WithLocation(16, 39));
9625
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9628
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9631
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9634
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9637
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48));
9658
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9664
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9667
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9676
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9679
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48),
9709
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9715
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9718
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9727
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9730
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48),
9745
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P5").WithLocation(7, 39),
9748
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P6").WithLocation(8, 39),
9751
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P7").WithLocation(9, 39),
9754
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P8").WithLocation(10, 48),
9757
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "S.P9").WithLocation(11, 48));
9824
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(4, 32),
9898
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P2").WithLocation(4, 32),
9907
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P4").WithLocation(6, 32),
9972
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.P2").WithLocation(4, 50),
9975
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.P3").WithLocation(5, 36),
9981
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "set").WithArguments("set", "B.Q2").WithLocation(7, 50),
9984
Diagnostic(ErrorCode.
WRN_AccessorDoesNotUseBackingField
, "get").WithArguments("get", "B.Q3").WithLocation(8, 36));
10853
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),