296 references to WRN_UnreferencedField
Microsoft.CodeAnalysis.CSharp (4)
Errors\ErrorFacts.cs (2)
267case ErrorCode.WRN_UnreferencedField: 593or ErrorCode.WRN_UnreferencedField
Generated\ErrorFacts.Generated.cs (1)
19case ErrorCode.WRN_UnreferencedField:
Symbols\Source\SourceAssemblySymbol.cs (1)
2742diagnostics.Add(ErrorCode.WRN_UnreferencedField, field.GetFirstLocationOrNone(), field);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
12663new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_UnreferencedField, "C.f"), Location.None).GetMessage(CultureInfo.InvariantCulture),
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (8)
BreakingChanges.cs (2)
299Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S1<T>.x").WithLocation(3, 18), 302Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S1<T>.S2.x").WithLocation(6, 18)
CodeGen\CodeGenDeconstructTests.cs (2)
8925Diagnostic(ErrorCode.WRN_UnreferencedField, "Item2").WithArguments("(T1, T2).Item2").WithLocation(13, 20) 8971Diagnostic(ErrorCode.WRN_UnreferencedField, "Item2").WithArguments("(T1, T2).Item2").WithLocation(13, 20),
CodeGen\CodeGenTupleTest.cs (1)
234Diagnostic(ErrorCode.WRN_UnreferencedField, "Item2").WithArguments("(T1, T2).Item2").WithLocation(7, 20),
CodeGen\DestructorTests.cs (1)
509Diagnostic(ErrorCode.WRN_UnreferencedField, "Finalize").WithArguments("C.Finalize")
Emit\CompilationEmitTests.cs (2)
133Diagnostic(ErrorCode.WRN_UnreferencedField, "q").WithArguments("X.q")); 5610Diagnostic(ErrorCode.WRN_UnreferencedField, "_f").WithArguments("X._f").WithLocation(4, 9).WithWarningAsError(true));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\PDBUsingTests.cs (1)
3160Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("C.i"),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (43)
Attributes\AttributeTests.cs (8)
6110Diagnostic(ErrorCode.WRN_UnreferencedField, "t1").WithArguments("G<T>.t1"), 6113Diagnostic(ErrorCode.WRN_UnreferencedField, "t2").WithArguments("G<T>.t2"), 6116Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("X.x"), 6119Diagnostic(ErrorCode.WRN_UnreferencedField, "y").WithArguments("X.y") 6512Diagnostic(ErrorCode.WRN_UnreferencedField, "ProtectionLevel").WithArguments("F.ProtectionLevel"), 7677Diagnostic(ErrorCode.WRN_UnreferencedField, "Goo3").WithArguments("C.Goo3").WithLocation(15, 17)); 7736Diagnostic(ErrorCode.WRN_UnreferencedField, "Goo3").WithArguments("C.Goo3").WithLocation(15, 17)); 8046Diagnostic(ErrorCode.WRN_UnreferencedField, "PrivateField").WithArguments("B.PrivateField"),
Attributes\AttributeTests_LifetimeAnnotation.cs (1)
155Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("Program.F").WithLocation(6, 24),
Attributes\AttributeTests_Locations.cs (1)
504Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("C.a"));
Attributes\AttributeTests_WellKnownAttributes.cs (1)
13599Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute.F").WithLocation(6, 21));
Diagnostics\DiagnosticSuppressorTests.cs (2)
174Diagnostic(ErrorCode.WRN_UnreferencedField, "f", isSuppressed: false).WithArguments("C.f").WithLocation(5, 26)); 280Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C1.f").WithLocation(1, 33));
FlowAnalysis\FlowDiagnosticTests.cs (16)
948Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("A.a").WithLocation(4, 7)); 993Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("B<T>.x").WithLocation(9, 20), 996Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("A<T>.x").WithLocation(4, 20), 999Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("D<T>.x").WithLocation(18, 20), 1002Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C<T>.x").WithLocation(14, 17), 1234Diagnostic(ErrorCode.WRN_UnreferencedField, "y").WithArguments("S.y").WithLocation(4, 12) 1241Diagnostic(ErrorCode.WRN_UnreferencedField, "y").WithArguments("S.y").WithLocation(4, 12)); 1273Diagnostic(ErrorCode.WRN_UnreferencedField, "value").WithArguments("S.value") 1855Diagnostic(ErrorCode.WRN_UnreferencedField, "s3").WithArguments("T.s3").WithLocation(13, 15), 1858Diagnostic(ErrorCode.WRN_UnreferencedField, "s2").WithArguments("T.s2").WithLocation(13, 11), 1861Diagnostic(ErrorCode.WRN_UnreferencedField, "s1").WithArguments("T.s1").WithLocation(13, 7) 1876Assert.Equal(ErrorCode.WRN_UnreferencedField, (ErrorCode)bindingDiags[0].Code); 2424Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.S.x").WithLocation(5, 13) 2434Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.S.x").WithLocation(5, 13) 2581Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("Derived.x").WithLocation(8, 17) 2591Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("Derived.x").WithLocation(8, 17)
Semantics\ExtensionTests.cs (1)
2481Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("Extensions.extension(object).field").WithLocation(5, 31));
Semantics\OutVarTests.cs (2)
22649(int)ErrorCode.WRN_UnreferencedField 22762(int)ErrorCode.WRN_UnreferencedField,
Semantics\PatternMatchingTests_Scope.cs (2)
13435(int)ErrorCode.WRN_UnreferencedField 13513(int)ErrorCode.WRN_UnreferencedField,
Semantics\PatternMatchingTests5.cs (2)
749Diagnostic(ErrorCode.WRN_UnreferencedField, "Field1").WithArguments("C.Field1").WithLocation(4, 7), 752Diagnostic(ErrorCode.WRN_UnreferencedField, "Field2").WithArguments("C.Field2").WithLocation(4, 15),
Semantics\PrimaryConstructorTests.cs (1)
12968Diagnostic(ErrorCode.WRN_UnreferencedField, "s_f").WithArguments("C.s_f").WithLocation(9, 7)
Semantics\RecordTests.cs (6)
3278Diagnostic(ErrorCode.WRN_UnreferencedField, "Clone").WithArguments("C2.Clone").WithLocation(5, 12), 3290Diagnostic(ErrorCode.WRN_UnreferencedField, "Clone").WithArguments("C4.Clone").WithLocation(13, 17), 5718Diagnostic(ErrorCode.WRN_UnreferencedField, "field3").WithArguments("C1.field3").WithLocation(10, 20), 5781Diagnostic(ErrorCode.WRN_UnreferencedField, "Property2").WithArguments("C1.Property2").WithLocation(7, 17), 14564Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("C.X").WithLocation(6, 9) 14574Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("C.X").WithLocation(6, 9)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (7)
IOperation\IOperationTests_IVariableDeclaration.cs (7)
1539Diagnostic(ErrorCode.WRN_UnreferencedField, "i1").WithArguments("Program.i1").WithLocation(4, 9) 1594Diagnostic(ErrorCode.WRN_UnreferencedField, "i2").WithArguments("Program.i2").WithLocation(4, 13), 1597Diagnostic(ErrorCode.WRN_UnreferencedField, "i1").WithArguments("Program.i1").WithLocation(4, 9) 1642Diagnostic(ErrorCode.WRN_UnreferencedField, "i1").WithArguments("Program.i1").WithLocation(4, 9) 1693Diagnostic(ErrorCode.WRN_UnreferencedField, "i2").WithArguments("Program.i2").WithLocation(4, 13), 1696Diagnostic(ErrorCode.WRN_UnreferencedField, "i1").WithArguments("Program.i1").WithLocation(4, 9) 1754Diagnostic(ErrorCode.WRN_UnreferencedField, "i2").WithArguments("Program.i2").WithLocation(4, 13)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (92)
Semantics\AccessCheckTests.cs (4)
119Diagnostic(ErrorCode.WRN_UnreferencedField, "n1_priv").WithArguments("C.N1.n1_priv"), 125Diagnostic(ErrorCode.WRN_UnreferencedField, "n2_priv").WithArguments("C.N1.N2.n2_priv"), 330Diagnostic(ErrorCode.WRN_UnreferencedField, "n3_priv").WithArguments("C.N3.n3_priv"), 1364Diagnostic(ErrorCode.WRN_UnreferencedField, "_UnusedField").WithArguments("Class1._UnusedField").WithLocation(4, 17));
Semantics\AccessibilityTests.cs (2)
265Diagnostic(ErrorCode.WRN_UnreferencedField, "Fld3").WithArguments("RuleE<T>.Fld3"), 268Diagnostic(ErrorCode.WRN_UnreferencedField, "F3").WithArguments("D<T>.F3"));
Semantics\FunctionPointerTests.cs (2)
4043Diagnostic(ErrorCode.WRN_UnreferencedField, "Ptr").WithArguments("C.Ptr").WithLocation(4, 28) 4066Diagnostic(ErrorCode.WRN_UnreferencedField, "Ptr").WithArguments("C.Ptr").WithLocation(5, 65)
Semantics\NameLengthTests.cs (4)
76Diagnostic(ErrorCode.WRN_UnreferencedField, s_longSymbolName).WithArguments("Fields." + s_longSymbolName).WithLocation(6, 9), 79Diagnostic(ErrorCode.WRN_UnreferencedField, s_longSymbolName + 1).WithArguments("Fields." + s_longSymbolName + 1).WithLocation(7, 9), 167Diagnostic(ErrorCode.WRN_UnreferencedField, s_longSymbolName).WithArguments("Fields." + s_longSymbolName).WithLocation(6, 9), 170Diagnostic(ErrorCode.WRN_UnreferencedField, s_longSymbolName + 1).WithArguments("Fields." + s_longSymbolName + 1).WithLocation(7, 9),
Semantics\NullableReferenceTypesTests.cs (1)
114836#pragma warning disable {(int)ErrorCode.WRN_UnreferencedField}
Semantics\QueryTests.cs (1)
3000Diagnostic(ErrorCode.WRN_UnreferencedField, "Color").WithArguments("Program.Color"),
Semantics\RecordStructTests.cs (1)
1457Diagnostic(ErrorCode.WRN_UnreferencedField, "Clone").WithArguments("C2.Clone").WithLocation(5, 12),
Semantics\RefFieldTests.cs (4)
19992Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("R<T>.F").WithLocation(4, 19)); 21963Diagnostic(ErrorCode.WRN_UnreferencedField, "R").WithArguments("R.R").WithLocation(3, 16), 21993Diagnostic(ErrorCode.WRN_UnreferencedField, "R").WithArguments("R.R").WithLocation(3, 16), 22181Diagnostic(ErrorCode.WRN_UnreferencedField, "R").WithArguments("R.R").WithLocation(3, 16),
Semantics\SemanticAnalyzerTests.cs (2)
116Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.x").WithLocation(5, 16), 825Diagnostic(ErrorCode.WRN_UnreferencedField, "static_readonly").WithArguments("C.static_readonly").WithLocation(12, 33),
Semantics\SemanticErrorTests.cs (8)
3235Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("Base.P.X")); 12936Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("Base.i"), 12939Diagnostic(ErrorCode.WRN_UnreferencedField, "j").WithArguments("Derived.j")); 13017Diagnostic(ErrorCode.WRN_UnreferencedField, "num").WithArguments("MyClass.num") 19333Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("ClassX.i") 19362Diagnostic(ErrorCode.WRN_UnreferencedField, "ActuallyPrivate").WithArguments("InternalClass.ActuallyPrivate"), 19398Diagnostic(ErrorCode.WRN_UnreferencedField, "ActuallyPrivate").WithArguments("InternalClass.ActuallyPrivate"), 23089Diagnostic(ErrorCode.WRN_UnreferencedField, "d2").WithArguments("CSSample.Program.d2").WithLocation(16, 19),
Semantics\StructConstructorTests.cs (4)
3061Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S.F").WithLocation(3, 20), 3333Diagnostic(ErrorCode.WRN_UnreferencedField, "F0").WithArguments("S0.F0").WithLocation(4, 12)); 3531Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("S1.X").WithLocation(3, 12), 3622Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("S1.X").WithLocation(6, 12),
Semantics\StructsTests.cs (1)
42Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("A.a").WithLocation(4, 7));
Semantics\UninitializedNonNullableFieldTests.cs (5)
94Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("C.G").WithLocation(4, 19)); 117Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("C.G").WithLocation(5, 19)); 142Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("C.G").WithLocation(4, 19)); 637Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("C<T>.field").WithLocation(7, 7) 2128Diagnostic(ErrorCode.WRN_UnreferencedField, "_f").WithArguments("C._f").WithLocation(5, 20),
Semantics\UnsafeTests.cs (53)
2653Diagnostic(ErrorCode.WRN_UnreferencedField, "f0").WithArguments("C<T>.f0"), 2655Diagnostic(ErrorCode.WRN_UnreferencedField, "f1").WithArguments("C<T>.f1"), 2657Diagnostic(ErrorCode.WRN_UnreferencedField, "f2").WithArguments("C<T>.f2"), 2659Diagnostic(ErrorCode.WRN_UnreferencedField, "f3").WithArguments("C<T>.f3"), 2661Diagnostic(ErrorCode.WRN_UnreferencedField, "f4").WithArguments("C<T>.f4"), 2663Diagnostic(ErrorCode.WRN_UnreferencedField, "f5").WithArguments("C<T>.f5"), 2665Diagnostic(ErrorCode.WRN_UnreferencedField, "f6").WithArguments("C<T>.f6"), 2667Diagnostic(ErrorCode.WRN_UnreferencedField, "f7").WithArguments("C<T>.f7")); 11384Diagnostic(ErrorCode.WRN_UnreferencedField, "px").WithArguments("Test.px")); 11404Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b") 11417Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(8, 30) 11445Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(8, 30) 11452Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(8, 30) 11499Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 11502Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 11505Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30), 11508Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28) 11527Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28), 11530Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 11533Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 11536Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30) 11577Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 11580Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30), 11583Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28), 11586Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22)); 11590Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30), 11593Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 11596Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 11602Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28)); 11613Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28), 11616Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 11619Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 11622Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30)); 11626Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30), 11629Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 11632Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 11638Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28)); 11668Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35), 11671Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33) 11690Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33), 11693Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35) 11730Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33), 11733Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35)); 11737Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35), 11743Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33)); 11754Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33), 11757Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35)); 11761Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35), 11767Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33)); 11854Diagnostic(ErrorCode.WRN_UnreferencedField, "p").WithArguments("C.p")); 11939Diagnostic(ErrorCode.WRN_UnreferencedField, "ptr").WithArguments("C<T>.ptr")); 13269Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S.x").WithLocation(6, 7)); 13304Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S.x").WithLocation(6, 7));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (120)
Compilation\SemanticModelAPITests.cs (1)
1718Diagnostic(ErrorCode.WRN_UnreferencedField, "q").WithArguments("Q.q"));
DocumentationComments\DocumentationCommentCompilerTests.cs (2)
3598Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("C.field"), 6568Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("Generic<T>.C.f"),
Symbols\ConversionTests.cs (1)
305Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("C.a")
Symbols\ExtensionMethodTests.cs (2)
1377Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("A.G"), 1380Diagnostic(ErrorCode.WRN_UnreferencedField, "H").WithArguments("A.H"));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1097Diagnostic(ErrorCode.WRN_UnreferencedField, "_field").WithArguments("C._field").WithLocation(4, 21),
Symbols\GenericConstraintTests.cs (2)
6116Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("A.F").WithLocation(3, 10), 6118Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("B.F").WithLocation(7, 10));
Symbols\IndexerTests.cs (1)
1635Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("A.x"));
Symbols\Metadata\PE\TypeForwarders.cs (1)
823Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("Test.F").WithLocation(6, 25)
Symbols\OverriddenOrHiddenMembersTests.cs (2)
1238Diagnostic(ErrorCode.WRN_UnreferencedField, "n").WithArguments("CSClass.n"), 1241Diagnostic(ErrorCode.WRN_UnreferencedField, "n").WithArguments("CSHide.n"));
Symbols\RequiredMembersTests.cs (1)
4788Diagnostic(ErrorCode.WRN_UnreferencedField, "_field").WithArguments("Derived._field").WithLocation(4, 20),
Symbols\Source\ClsComplianceTests.cs (3)
251Diagnostic(ErrorCode.WRN_UnreferencedField, "F1").WithArguments("Levels.F1"), 254Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("Kinds.F"), 2044Diagnostic(ErrorCode.WRN_UnreferencedField, "_Private").WithArguments("Kinds._Private"),
Symbols\Source\DelegateTests.cs (1)
303Diagnostic(ErrorCode.WRN_UnreferencedField, "d3").WithArguments("CSSample.Program.d3"));
Symbols\Source\EnumTests.cs (1)
754Diagnostic(ErrorCode.WRN_UnreferencedField, "M").WithArguments("EnumPartial.M")
Symbols\Source\FieldTests.cs (2)
411Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("A.a"), 413Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("A.b"));
Symbols\Source\FileModifierTests.cs (2)
2173Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("E.field").WithLocation(8, 7), 2214Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("E.field").WithLocation(9, 13),
Symbols\Source\PropertyTests.cs (1)
168Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("S.a").WithLocation(4, 9));
Symbols\SymbolErrorTests.cs (96)
108options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions(new Dictionary<string, ReportDiagnostic>() { { MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_UnreferencedField), ReportDiagnostic.Suppress } }), 1099Diagnostic(ErrorCode.WRN_UnreferencedField, "value__").WithArguments("C.value__") 1615Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("NS.S<X>.x"), 1618Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("NS.S<X>.x") 1682Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("n3.S.a").WithLocation(22, 11) 1728Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("MyNamespace.MyClass.field").WithLocation(11, 24), 2332Diagnostic(ErrorCode.WRN_UnreferencedField, "foundNamespaceInsteadOfType").WithArguments("NS.Bar.foundNamespaceInsteadOfType") 3193Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("C<T>.a").WithLocation(6, 8), 3196Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(7, 8), 3199Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(8, 14) 4753Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("NS.S.field") 4895Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("A.f"), 5411Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("NS.Test.field") 5504Diagnostic(ErrorCode.WRN_UnreferencedField, "var").WithArguments("NS.Test.var")); 5523Diagnostic(ErrorCode.WRN_UnreferencedField, "var").WithArguments("Test.var") 8838Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("D<T>.F").WithLocation(16, 18), 8841Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("H<T>.G").WithLocation(32, 7), 8844Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("C.G").WithLocation(12, 7), 8847Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("K.F").WithLocation(40, 14), 8850Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("G.F").WithLocation(28, 10), 8853Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("B.G").WithLocation(8, 7), 8856Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("J.F").WithLocation(36, 14), 8859Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("A.F").WithLocation(3, 7), 8862Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("E.F").WithLocation(20, 10), 8865Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("L.G").WithLocation(44, 14), 8868Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("B.F").WithLocation(7, 7), 8871Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("F<T>.G").WithLocation(24, 7) 8959Diagnostic(ErrorCode.WRN_UnreferencedField, "Q").WithArguments("G.Q"), 8962Diagnostic(ErrorCode.WRN_UnreferencedField, "Q").WithArguments("H<T>.Q") 8986Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("A.F").WithLocation(3, 7), 8989Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("B.G").WithLocation(7, 14) 9059Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("W<T>.x") 9092Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S2<T, U>.F").WithLocation(7, 14), 9095Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S3<T>.F").WithLocation(11, 7), 9098Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S4<T>.F").WithLocation(15, 15), 9101Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S1<T, U>.F").WithLocation(3, 24) 9164Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S1<T>.x").WithLocation(8, 18), 9167Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S4<T>.x").WithLocation(23, 18), 9170Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S3<T>.x").WithLocation(18, 18), 9173Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S0<T>.x").WithLocation(3, 18), 9176Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S2<T>.x").WithLocation(13, 18), 9179Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S5<T>.x").WithLocation(28, 18), 9182Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S6<T>.x").WithLocation(32, 20)); 9975Diagnostic(ErrorCode.WRN_UnreferencedField, "D").WithArguments("NS.E.D"), 9978Diagnostic(ErrorCode.WRN_UnreferencedField, "E").WithArguments("NS.E.E"), 9981Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("NS.E.F"), 9984Diagnostic(ErrorCode.WRN_UnreferencedField, "Q").WithArguments("NS.R.Q"), 9987Diagnostic(ErrorCode.WRN_UnreferencedField, "R").WithArguments("NS.R.R")); 10954Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("x.cly.a").WithLocation(12, 13), 10960Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("x.cly.i").WithLocation(13, 13), 10972Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("x.cly.a").WithLocation(12, 13), 10975Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("x.cly.i").WithLocation(13, 13), 11078Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("NS.S.field") 11415Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("MainClass.i") 12393Diagnostic(ErrorCode.WRN_UnreferencedField, "Field1").WithArguments("NS.Goo.SGoo.Field1"), 12469Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("TestClass.i") 12512Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C1<T>.f"), 12514Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C2<T>.f"), 12516Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C3<T>.f"), 12518Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C4<T>.f"), 12520Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C5<T>.f")); 12540Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("TestClass.i")); 13102Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("NS.Goo.i"), 13105Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("NS.Bar<T>.field")); 13569Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("NS.Test.X"), 13572Diagnostic(ErrorCode.WRN_UnreferencedField, "Y").WithArguments("NS.Test.Y"), 13575Diagnostic(ErrorCode.WRN_UnreferencedField, "Z").WithArguments("NS.Test.Z")); 14178Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C.f").WithLocation(4, 17)); 14610Diagnostic(ErrorCode.WRN_UnreferencedField, "myStaticField").WithArguments("NS.Test.myStaticField") 15070Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("B.F")); 16094Diagnostic(ErrorCode.WRN_UnreferencedField, "Age").WithArguments("A.Age") 17635Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("A.i"), 17638Diagnostic(ErrorCode.WRN_UnreferencedField, "j").WithArguments("A.j")); 17738Diagnostic(ErrorCode.WRN_UnreferencedField, "cls").WithArguments("SA.Test.cls")); 19556Diagnostic(ErrorCode.WRN_UnreferencedField, "get_P").WithArguments("C.get_P")); 19642Diagnostic(ErrorCode.WRN_UnreferencedField, "A").WithArguments("C<A, B, D, E, F, G>.A")); 19706Diagnostic(ErrorCode.WRN_UnreferencedField, "T").WithArguments("N.S.T"), 19709Diagnostic(ErrorCode.WRN_UnreferencedField, "I").WithArguments("N.S.I") 19775Diagnostic(ErrorCode.WRN_UnreferencedField, "T").WithArguments("C.S.T"), 19778Diagnostic(ErrorCode.WRN_UnreferencedField, "I").WithArguments("C.S.I") 19819Diagnostic(ErrorCode.WRN_UnreferencedField, "add_E").WithArguments("C.add_E"), 19895Diagnostic(ErrorCode.WRN_UnreferencedField, "Item").WithArguments("S.Item"), 19898Diagnostic(ErrorCode.WRN_UnreferencedField, "P").WithArguments("S.P"), 19901Diagnostic(ErrorCode.WRN_UnreferencedField, "get_Item").WithArguments("A.get_Item"), 19904Diagnostic(ErrorCode.WRN_UnreferencedField, "set_Item").WithArguments("A.set_Item"), 19907Diagnostic(ErrorCode.WRN_UnreferencedField, "get_Item").WithArguments("B.get_Item"), 19910Diagnostic(ErrorCode.WRN_UnreferencedField, "get_P").WithArguments("B.get_P"), 19935Diagnostic(ErrorCode.WRN_UnreferencedField, "Item").WithArguments("A.Item")); 19943Diagnostic(ErrorCode.WRN_UnreferencedField, "get_Item").WithArguments("A.get_Item")); 19950Diagnostic(ErrorCode.WRN_UnreferencedField, "set_Item").WithArguments("A.set_Item")); 19978Diagnostic(ErrorCode.WRN_UnreferencedField, "P").WithArguments("A.P")); 19986Diagnostic(ErrorCode.WRN_UnreferencedField, "get_P").WithArguments("A.get_P")); 19993Diagnostic(ErrorCode.WRN_UnreferencedField, "set_P").WithArguments("A.set_P")); 20007Diagnostic(ErrorCode.WRN_UnreferencedField, "Item").WithArguments("A.Item")); 20011Diagnostic(ErrorCode.WRN_UnreferencedField, "get_Item").WithArguments("A.get_Item")); 20015Diagnostic(ErrorCode.WRN_UnreferencedField, "set_Item").WithArguments("A.set_Item"));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (20)
Diagnostics\DiagnosticTest.cs (1)
2947case ErrorCode.WRN_UnreferencedField:
Parsing\ExtensionsParsingTests.cs (1)
2862Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("C.extension(object).field").WithLocation(5, 13));
Parsing\FileModifierParsingTests.cs (5)
859Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.x").WithLocation(3, 14) 1062Diagnostic(ErrorCode.WRN_UnreferencedField, "file").WithArguments("C.file").WithLocation(3, 9) 1277Diagnostic(ErrorCode.WRN_UnreferencedField, "async").WithArguments("C.async").WithLocation(3, 10) 1363Diagnostic(ErrorCode.WRN_UnreferencedField, "item").WithArguments("C.item").WithLocation(3, 10) 2916Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("C.X").WithLocation(3, 17)
Parsing\ParserErrorMessageTests.cs (4)
744Diagnostic(ErrorCode.WRN_UnreferencedField, "myarray").WithArguments("MyClass.myarray").WithLocation(14, 19), 756Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("MyClass.b").WithLocation(16, 23), 762Diagnostic(ErrorCode.WRN_UnreferencedField, "d").WithArguments("MyClass.d").WithLocation(17, 27), 1679Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("x.clx.i").WithLocation(5, 13));
Parsing\SeparatedSyntaxListParsingTests.cs (2)
700Diagnostic(ErrorCode.WRN_UnreferencedField, "a1").WithArguments("C.a1").WithLocation(6, 12), 712Diagnostic(ErrorCode.WRN_UnreferencedField, "a1").WithArguments("C.a1").WithLocation(7, 12),
Parsing\UsingDirectiveParsingTests.cs (4)
3642Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("D.x").WithLocation(11, 7), 3648Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("D.c").WithLocation(12, 7)); 3792Diagnostic(ErrorCode.WRN_UnreferencedField, "x1").WithArguments("D.x1").WithLocation(11, 7), 3798Diagnostic(ErrorCode.WRN_UnreferencedField, "c1").WithArguments("D.c1").WithLocation(12, 9));
Syntax\FieldAndValueKeywordTests.cs (1)
1468Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("C.field").WithLocation(3, 16),
Syntax\SyntaxFactoryTests.cs (2)
671Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.x").WithLocation(1, 34)); 679Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.x").WithLocation(1, 34));