293 references to WRN_UnreferencedField
Microsoft.CodeAnalysis.CSharp (4)
Errors\ErrorFacts.cs (2)
254case ErrorCode.WRN_UnreferencedField: 551case ErrorCode.WRN_UnreferencedField:
Generated\ErrorFacts.Generated.cs (1)
19case ErrorCode.WRN_UnreferencedField:
Symbols\Source\SourceAssemblySymbol.cs (1)
2698diagnostics.Add(ErrorCode.WRN_UnreferencedField, field.Locations.FirstOrNone(), field);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
12344new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_UnreferencedField, "C.f"), Location.None).GetMessage(CultureInfo.InvariantCulture),
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
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)
132Diagnostic(ErrorCode.WRN_UnreferencedField, "q").WithArguments("X.q")); 5604Diagnostic(ErrorCode.WRN_UnreferencedField, "_f").WithArguments("X._f").WithLocation(4, 9).WithWarningAsError(true));
PDB\PDBUsingTests.cs (1)
2618Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("C.i"),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (33)
Attributes\AttributeTests.cs (8)
5812Diagnostic(ErrorCode.WRN_UnreferencedField, "t1").WithArguments("G<T>.t1"), 5815Diagnostic(ErrorCode.WRN_UnreferencedField, "t2").WithArguments("G<T>.t2"), 5818Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("X.x"), 5821Diagnostic(ErrorCode.WRN_UnreferencedField, "y").WithArguments("X.y") 6214Diagnostic(ErrorCode.WRN_UnreferencedField, "ProtectionLevel").WithArguments("F.ProtectionLevel"), 7379Diagnostic(ErrorCode.WRN_UnreferencedField, "Goo3").WithArguments("C.Goo3").WithLocation(15, 17)); 7438Diagnostic(ErrorCode.WRN_UnreferencedField, "Goo3").WithArguments("C.Goo3").WithLocation(15, 17)); 7748Diagnostic(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)
13423Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("System.Runtime.CompilerServices.IsReadOnlyAttribute.F").WithLocation(6, 21));
Diagnostics\DiagnosticSuppressorTests.cs (2)
86Diagnostic(ErrorCode.WRN_UnreferencedField, "f", isSuppressed: false).WithArguments("C.f").WithLocation(5, 26)); 192Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C1.f").WithLocation(1, 33));
FlowAnalysis\FlowDiagnosticTests.cs (16)
941Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("A.a").WithLocation(4, 7)); 981Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("B<T>.x").WithLocation(9, 20), 984Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("A<T>.x").WithLocation(4, 20), 987Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("D<T>.x").WithLocation(18, 20), 990Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C<T>.x").WithLocation(14, 17) 1216Diagnostic(ErrorCode.WRN_UnreferencedField, "y").WithArguments("S.y").WithLocation(4, 12) 1223Diagnostic(ErrorCode.WRN_UnreferencedField, "y").WithArguments("S.y").WithLocation(4, 12)); 1255Diagnostic(ErrorCode.WRN_UnreferencedField, "value").WithArguments("S.value") 1837Diagnostic(ErrorCode.WRN_UnreferencedField, "s3").WithArguments("T.s3").WithLocation(13, 15), 1840Diagnostic(ErrorCode.WRN_UnreferencedField, "s2").WithArguments("T.s2").WithLocation(13, 11), 1843Diagnostic(ErrorCode.WRN_UnreferencedField, "s1").WithArguments("T.s1").WithLocation(13, 7) 1858Assert.Equal(ErrorCode.WRN_UnreferencedField, (ErrorCode)bindingDiags[0].Code); 2406Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.S.x").WithLocation(5, 13) 2416Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.S.x").WithLocation(5, 13) 2563Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("Derived.x").WithLocation(8, 17) 2573Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("Derived.x").WithLocation(8, 17)
Semantics\PatternMatchingTests_Scope.cs (2)
13386(int)ErrorCode.WRN_UnreferencedField 13464(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),
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 (101)
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)
4022Diagnostic(ErrorCode.WRN_UnreferencedField, "Ptr").WithArguments("C.Ptr").WithLocation(4, 28) 4045Diagnostic(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)
111066#pragma warning disable {(int)ErrorCode.WRN_UnreferencedField}
Semantics\OutVarTests.cs (2)
22590(int)ErrorCode.WRN_UnreferencedField 22703(int)ErrorCode.WRN_UnreferencedField,
Semantics\PrimaryConstructorTests.cs (1)
11950Diagnostic(ErrorCode.WRN_UnreferencedField, "s_f").WithArguments("C.s_f").WithLocation(9, 7)
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\RecordTests.cs (6)
3223Diagnostic(ErrorCode.WRN_UnreferencedField, "Clone").WithArguments("C2.Clone").WithLocation(5, 12), 3235Diagnostic(ErrorCode.WRN_UnreferencedField, "Clone").WithArguments("C4.Clone").WithLocation(13, 17), 5663Diagnostic(ErrorCode.WRN_UnreferencedField, "field3").WithArguments("C1.field3").WithLocation(10, 20), 5726Diagnostic(ErrorCode.WRN_UnreferencedField, "Property2").WithArguments("C1.Property2").WithLocation(7, 17), 14461Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("C.X").WithLocation(6, 9) 14471Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("C.X").WithLocation(6, 9)
Semantics\RefFieldTests.cs (4)
19376Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("R<T>.F").WithLocation(4, 19)); 21356Diagnostic(ErrorCode.WRN_UnreferencedField, "R").WithArguments("R.R").WithLocation(3, 16), 21386Diagnostic(ErrorCode.WRN_UnreferencedField, "R").WithArguments("R.R").WithLocation(3, 16), 21574Diagnostic(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)
3237Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("Base.P.X")); 12886Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("Base.i"), 12889Diagnostic(ErrorCode.WRN_UnreferencedField, "j").WithArguments("Derived.j")); 12967Diagnostic(ErrorCode.WRN_UnreferencedField, "num").WithArguments("MyClass.num") 19109Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("ClassX.i") 19138Diagnostic(ErrorCode.WRN_UnreferencedField, "ActuallyPrivate").WithArguments("InternalClass.ActuallyPrivate"), 19174Diagnostic(ErrorCode.WRN_UnreferencedField, "ActuallyPrivate").WithArguments("InternalClass.ActuallyPrivate"), 22833Diagnostic(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)
41Diagnostic(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)
394Diagnostic(ErrorCode.WRN_UnreferencedField, "f0").WithArguments("C<T>.f0"), 396Diagnostic(ErrorCode.WRN_UnreferencedField, "f1").WithArguments("C<T>.f1"), 398Diagnostic(ErrorCode.WRN_UnreferencedField, "f2").WithArguments("C<T>.f2"), 400Diagnostic(ErrorCode.WRN_UnreferencedField, "f3").WithArguments("C<T>.f3"), 402Diagnostic(ErrorCode.WRN_UnreferencedField, "f4").WithArguments("C<T>.f4"), 404Diagnostic(ErrorCode.WRN_UnreferencedField, "f5").WithArguments("C<T>.f5"), 406Diagnostic(ErrorCode.WRN_UnreferencedField, "f6").WithArguments("C<T>.f6"), 408Diagnostic(ErrorCode.WRN_UnreferencedField, "f7").WithArguments("C<T>.f7")); 8532Diagnostic(ErrorCode.WRN_UnreferencedField, "px").WithArguments("Test.px")); 8552Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b") 8565Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(8, 30) 8593Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(8, 30) 8600Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(8, 30) 8647Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 8650Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 8653Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30), 8656Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28) 8675Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28), 8678Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 8681Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 8684Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30) 8725Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 8728Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30), 8731Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28), 8734Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22)); 8738Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30), 8741Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 8744Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 8750Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28)); 8761Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28), 8764Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 8767Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 8770Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30)); 8774Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 30), 8777Diagnostic(ErrorCode.WRN_UnreferencedField, "b1").WithArguments("C<T>.b1").WithLocation(13, 22), 8780Diagnostic(ErrorCode.WRN_UnreferencedField, "b2").WithArguments("C<T>.b2").WithLocation(14, 24), 8786Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(17, 28)); 8816Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35), 8819Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33) 8838Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33), 8841Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35) 8878Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33), 8881Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35)); 8885Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35), 8891Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33)); 8902Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33), 8905Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35)); 8909Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(10, 35), 8915Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(13, 33)); 9002Diagnostic(ErrorCode.WRN_UnreferencedField, "p").WithArguments("C.p")); 9087Diagnostic(ErrorCode.WRN_UnreferencedField, "ptr").WithArguments("C<T>.ptr")); 10387Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S.x").WithLocation(6, 7)); 10422Diagnostic(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)
1853Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("C.field"), 4823Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("Generic<T>.C.f"),
Symbols\ConversionTests.cs (1)
302Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("C.a")
Symbols\ExtensionMethodTests.cs (2)
1381Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("A.G"), 1384Diagnostic(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)
6089Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("A.F").WithLocation(3, 10), 6091Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("B.F").WithLocation(7, 10));
Symbols\IndexerTests.cs (1)
1633Diagnostic(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)
4159Diagnostic(ErrorCode.WRN_UnreferencedField, "_field").WithArguments("Derived._field").WithLocation(4, 20),
Symbols\Source\ClsComplianceTests.cs (3)
252Diagnostic(ErrorCode.WRN_UnreferencedField, "F1").WithArguments("Levels.F1"), 255Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("Kinds.F"), 2045Diagnostic(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)
1892Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("E.field").WithLocation(8, 7), 1933Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("E.field").WithLocation(9, 13),
Symbols\Source\PropertyTests.cs (1)
167Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("S.a").WithLocation(4, 9));
Symbols\SymbolErrorTests.cs (96)
107options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions(new Dictionary<string, ReportDiagnostic>() { { MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_UnreferencedField), ReportDiagnostic.Suppress } }), 1098Diagnostic(ErrorCode.WRN_UnreferencedField, "value__").WithArguments("C.value__") 1614Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("NS.S<X>.x"), 1617Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("NS.S<X>.x") 1681Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("n3.S.a").WithLocation(22, 11) 1727Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("MyNamespace.MyClass.field").WithLocation(11, 24), 2328Diagnostic(ErrorCode.WRN_UnreferencedField, "foundNamespaceInsteadOfType").WithArguments("NS.Bar.foundNamespaceInsteadOfType") 3178Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("C<T>.a").WithLocation(6, 8), 3181Diagnostic(ErrorCode.WRN_UnreferencedField, "b").WithArguments("C<T>.b").WithLocation(7, 8), 3184Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("C<T>.c").WithLocation(8, 14) 4677Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("NS.S.field") 4819Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("A.f"), 5335Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("NS.Test.field") 5428Diagnostic(ErrorCode.WRN_UnreferencedField, "var").WithArguments("NS.Test.var")); 5447Diagnostic(ErrorCode.WRN_UnreferencedField, "var").WithArguments("Test.var") 8695Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("D<T>.F").WithLocation(16, 18), 8698Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("H<T>.G").WithLocation(32, 7), 8701Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("C.G").WithLocation(12, 7), 8704Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("K.F").WithLocation(40, 14), 8707Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("G.F").WithLocation(28, 10), 8710Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("B.G").WithLocation(8, 7), 8713Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("J.F").WithLocation(36, 14), 8716Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("A.F").WithLocation(3, 7), 8719Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("E.F").WithLocation(20, 10), 8722Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("L.G").WithLocation(44, 14), 8725Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("B.F").WithLocation(7, 7), 8728Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("F<T>.G").WithLocation(24, 7) 8816Diagnostic(ErrorCode.WRN_UnreferencedField, "Q").WithArguments("G.Q"), 8819Diagnostic(ErrorCode.WRN_UnreferencedField, "Q").WithArguments("H<T>.Q") 8843Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("A.F").WithLocation(3, 7), 8846Diagnostic(ErrorCode.WRN_UnreferencedField, "G").WithArguments("B.G").WithLocation(7, 14) 8916Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("W<T>.x") 8949Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S2<T, U>.F").WithLocation(7, 14), 8952Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S3<T>.F").WithLocation(11, 7), 8955Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S4<T>.F").WithLocation(15, 15), 8958Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("S1<T, U>.F").WithLocation(3, 24) 9021Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S1<T>.x").WithLocation(8, 18), 9024Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S4<T>.x").WithLocation(23, 18), 9027Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S3<T>.x").WithLocation(18, 18), 9030Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S0<T>.x").WithLocation(3, 18), 9033Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S2<T>.x").WithLocation(13, 18), 9036Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S5<T>.x").WithLocation(28, 18), 9039Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("S6<T>.x").WithLocation(32, 20)); 9832Diagnostic(ErrorCode.WRN_UnreferencedField, "D").WithArguments("NS.E.D"), 9835Diagnostic(ErrorCode.WRN_UnreferencedField, "E").WithArguments("NS.E.E"), 9838Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("NS.E.F"), 9841Diagnostic(ErrorCode.WRN_UnreferencedField, "Q").WithArguments("NS.R.Q"), 9844Diagnostic(ErrorCode.WRN_UnreferencedField, "R").WithArguments("NS.R.R")); 10811Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("x.cly.a").WithLocation(12, 13), 10817Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("x.cly.i").WithLocation(13, 13), 10829Diagnostic(ErrorCode.WRN_UnreferencedField, "a").WithArguments("x.cly.a").WithLocation(12, 13), 10832Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("x.cly.i").WithLocation(13, 13), 10935Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("NS.S.field") 11272Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("MainClass.i") 12250Diagnostic(ErrorCode.WRN_UnreferencedField, "Field1").WithArguments("NS.Goo.SGoo.Field1"), 12326Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("TestClass.i") 12369Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C1<T>.f"), 12371Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C2<T>.f"), 12373Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C3<T>.f"), 12375Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C4<T>.f"), 12377Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C5<T>.f")); 12397Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("TestClass.i")); 12954Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("NS.Goo.i"), 12957Diagnostic(ErrorCode.WRN_UnreferencedField, "field").WithArguments("NS.Bar<T>.field")); 13421Diagnostic(ErrorCode.WRN_UnreferencedField, "X").WithArguments("NS.Test.X"), 13424Diagnostic(ErrorCode.WRN_UnreferencedField, "Y").WithArguments("NS.Test.Y"), 13427Diagnostic(ErrorCode.WRN_UnreferencedField, "Z").WithArguments("NS.Test.Z")); 14030Diagnostic(ErrorCode.WRN_UnreferencedField, "f").WithArguments("C.f").WithLocation(4, 17)); 14462Diagnostic(ErrorCode.WRN_UnreferencedField, "myStaticField").WithArguments("NS.Test.myStaticField") 14922Diagnostic(ErrorCode.WRN_UnreferencedField, "F").WithArguments("B.F")); 15949Diagnostic(ErrorCode.WRN_UnreferencedField, "Age").WithArguments("A.Age") 17490Diagnostic(ErrorCode.WRN_UnreferencedField, "i").WithArguments("A.i"), 17493Diagnostic(ErrorCode.WRN_UnreferencedField, "j").WithArguments("A.j")); 17593Diagnostic(ErrorCode.WRN_UnreferencedField, "cls").WithArguments("SA.Test.cls")); 19411Diagnostic(ErrorCode.WRN_UnreferencedField, "get_P").WithArguments("C.get_P")); 19497Diagnostic(ErrorCode.WRN_UnreferencedField, "A").WithArguments("C<A, B, D, E, F, G>.A")); 19561Diagnostic(ErrorCode.WRN_UnreferencedField, "T").WithArguments("N.S.T"), 19564Diagnostic(ErrorCode.WRN_UnreferencedField, "I").WithArguments("N.S.I") 19630Diagnostic(ErrorCode.WRN_UnreferencedField, "T").WithArguments("C.S.T"), 19633Diagnostic(ErrorCode.WRN_UnreferencedField, "I").WithArguments("C.S.I") 19674Diagnostic(ErrorCode.WRN_UnreferencedField, "add_E").WithArguments("C.add_E"), 19750Diagnostic(ErrorCode.WRN_UnreferencedField, "Item").WithArguments("S.Item"), 19753Diagnostic(ErrorCode.WRN_UnreferencedField, "P").WithArguments("S.P"), 19756Diagnostic(ErrorCode.WRN_UnreferencedField, "get_Item").WithArguments("A.get_Item"), 19759Diagnostic(ErrorCode.WRN_UnreferencedField, "set_Item").WithArguments("A.set_Item"), 19762Diagnostic(ErrorCode.WRN_UnreferencedField, "get_Item").WithArguments("B.get_Item"), 19765Diagnostic(ErrorCode.WRN_UnreferencedField, "get_P").WithArguments("B.get_P"), 19790Diagnostic(ErrorCode.WRN_UnreferencedField, "Item").WithArguments("A.Item")); 19798Diagnostic(ErrorCode.WRN_UnreferencedField, "get_Item").WithArguments("A.get_Item")); 19805Diagnostic(ErrorCode.WRN_UnreferencedField, "set_Item").WithArguments("A.set_Item")); 19833Diagnostic(ErrorCode.WRN_UnreferencedField, "P").WithArguments("A.P")); 19841Diagnostic(ErrorCode.WRN_UnreferencedField, "get_P").WithArguments("A.get_P")); 19848Diagnostic(ErrorCode.WRN_UnreferencedField, "set_P").WithArguments("A.set_P")); 19862Diagnostic(ErrorCode.WRN_UnreferencedField, "Item").WithArguments("A.Item")); 19866Diagnostic(ErrorCode.WRN_UnreferencedField, "get_Item").WithArguments("A.get_Item")); 19870Diagnostic(ErrorCode.WRN_UnreferencedField, "set_Item").WithArguments("A.set_Item"));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (18)
Diagnostics\DiagnosticTest.cs (1)
2909case ErrorCode.WRN_UnreferencedField:
Parsing\FileModifierParsingTests.cs (5)
858Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.x").WithLocation(3, 14) 1061Diagnostic(ErrorCode.WRN_UnreferencedField, "file").WithArguments("C.file").WithLocation(3, 9) 1276Diagnostic(ErrorCode.WRN_UnreferencedField, "async").WithArguments("C.async").WithLocation(3, 10) 1362Diagnostic(ErrorCode.WRN_UnreferencedField, "item").WithArguments("C.item").WithLocation(3, 10) 2915Diagnostic(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)
3692Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("D.x").WithLocation(11, 7), 3698Diagnostic(ErrorCode.WRN_UnreferencedField, "c").WithArguments("D.c").WithLocation(12, 7)); 3842Diagnostic(ErrorCode.WRN_UnreferencedField, "x1").WithArguments("D.x1").WithLocation(11, 7), 3848Diagnostic(ErrorCode.WRN_UnreferencedField, "c1").WithArguments("D.c1").WithLocation(12, 9));
Syntax\SyntaxFactoryTests.cs (2)
657Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.x").WithLocation(1, 34)); 665Diagnostic(ErrorCode.WRN_UnreferencedField, "x").WithArguments("C.x").WithLocation(1, 34));