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)
336Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "from field in new int[0]").WithArguments("14.0").WithLocation(4, 27), 366Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "let field = i").WithArguments("14.0").WithLocation(4, 48), 396Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "join field in new int[0] on x equals field").WithArguments("14.0").WithLocation(4, 48), 426Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "into field").WithArguments("14.0").WithLocation(4, 83), 456Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "into field select field").WithArguments("14.0").WithLocation(4, 57), 486Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "object field() => null;").WithArguments("14.0").WithLocation(4, 23)); 513Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = 0").WithArguments("14.0").WithLocation(4, 27)); 540Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("14.0").WithLocation(4, 33)); 583Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "foreach (var field in new int[0]) { }").WithArguments("14.0").WithLocation(3, 23)); 609Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("14.0").WithLocation(3, 37), 649Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "(Exception field)").WithArguments("14.0").WithLocation(5, 37)); 677Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = GetDisposable()").WithArguments("14.0").WithLocation(4, 34)); 705Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = GetDisposable()").WithArguments("14.0").WithLocation(4, 33)); 732Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("14.0").WithLocation(4, 33)); 759Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "object field").WithArguments("14.0").WithLocation(4, 33), 857Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("14.0").WithLocation(5, 28), 909Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = 1").WithArguments("14.0").WithLocation(7, 20), 953Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("14.0").WithLocation(8, 18), 1066Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = 1").WithArguments("14.0").WithLocation(10, 32), 1105Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("14.0").WithLocation(10, 17), 1143Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field").WithArguments("14.0").WithLocation(10, 18)); 1178Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "object field").WithArguments("14.0").WithLocation(10, 27)); 1212Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "field = 1").WithArguments("14.0").WithLocation(8, 34), 1249Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "object field").WithArguments("14.0").WithLocation(8, 23), 1413Diagnostic(ErrorCode.ERR_VariableDeclarationNamedField, "int field").WithArguments("14.0").WithLocation(14, 21));