27 references to ERR_VariableDeclarationNamedField
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
1518diagnostics.Add(ErrorCode.ERR_VariableDeclarationNamedField, syntax, requiredVersion.ToDisplayString());
Errors\ErrorFacts.cs (1)
2485or ErrorCode.ERR_VariableDeclarationNamedField
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (25)
Syntax\FieldAndValueKeywordTests.cs (25)
333Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "from field in new int[0]").WithArguments("preview").WithLocation(4, 27), 363Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "let field = i").WithArguments("preview").WithLocation(4, 48), 393Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "join field in new int[0] on x equals field").WithArguments("preview").WithLocation(4, 48), 423Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "into field").WithArguments("preview").WithLocation(4, 83), 453Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "into field select field").WithArguments("preview").WithLocation(4, 57), 483Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "object field() => null;").WithArguments("preview").WithLocation(4, 23)); 510Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = 0").WithArguments("preview").WithLocation(4, 27)); 537Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("preview").WithLocation(4, 33)); 580Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "foreach (var field in new int[0]) { }").WithArguments("preview").WithLocation(3, 23)); 606Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("preview").WithLocation(3, 37), 646Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "(Exception field)").WithArguments("preview").WithLocation(5, 37)); 674Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = GetDisposable()").WithArguments("preview").WithLocation(4, 34)); 702Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = GetDisposable()").WithArguments("preview").WithLocation(4, 33)); 729Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("preview").WithLocation(4, 33)); 756Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "object field").WithArguments("preview").WithLocation(4, 33), 854Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("preview").WithLocation(5, 28), 906Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = 1").WithArguments("preview").WithLocation(7, 20), 950Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("preview").WithLocation(8, 18), 1063Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = 1").WithArguments("preview").WithLocation(10, 32), 1102Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("preview").WithLocation(10, 17), 1140Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("preview").WithLocation(10, 18)); 1175Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "object field").WithArguments("preview").WithLocation(10, 27)); 1209Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = 1").WithArguments("preview").WithLocation(8, 34), 1246Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "object field").WithArguments("preview").WithLocation(8, 23), 1410Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "int field").WithArguments("preview").WithLocation(14, 21));