27 references to ERR_VariableDeclarationNamedField
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Expressions.cs (1)
1518
diagnostics.Add(ErrorCode.
ERR_VariableDeclarationNamedField
, syntax, requiredVersion.ToDisplayString());
Errors\ErrorFacts.cs (1)
2485
or ErrorCode.
ERR_VariableDeclarationNamedField
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (25)
Syntax\FieldAndValueKeywordTests.cs (25)
336
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "from field in new int[0]").WithArguments("14.0").WithLocation(4, 27),
366
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "let field = i").WithArguments("14.0").WithLocation(4, 48),
396
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "join field in new int[0] on x equals field").WithArguments("14.0").WithLocation(4, 48),
426
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "into field").WithArguments("14.0").WithLocation(4, 83),
456
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "into field select field").WithArguments("14.0").WithLocation(4, 57),
486
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "object field() => null;").WithArguments("14.0").WithLocation(4, 23));
513
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field = 0").WithArguments("14.0").WithLocation(4, 27));
540
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field").WithArguments("14.0").WithLocation(4, 33));
583
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "foreach (var field in new int[0]) { }").WithArguments("14.0").WithLocation(3, 23));
609
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field").WithArguments("14.0").WithLocation(3, 37),
649
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "(Exception field)").WithArguments("14.0").WithLocation(5, 37));
677
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field = GetDisposable()").WithArguments("14.0").WithLocation(4, 34));
705
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field = GetDisposable()").WithArguments("14.0").WithLocation(4, 33));
732
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field").WithArguments("14.0").WithLocation(4, 33));
759
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "object field").WithArguments("14.0").WithLocation(4, 33),
857
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field").WithArguments("14.0").WithLocation(5, 28),
909
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field = 1").WithArguments("14.0").WithLocation(7, 20),
953
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field").WithArguments("14.0").WithLocation(8, 18),
1066
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field = 1").WithArguments("14.0").WithLocation(10, 32),
1105
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field").WithArguments("14.0").WithLocation(10, 17),
1143
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field").WithArguments("14.0").WithLocation(10, 18));
1178
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "object field").WithArguments("14.0").WithLocation(10, 27));
1212
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "field = 1").WithArguments("14.0").WithLocation(8, 34),
1249
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "object field").WithArguments("14.0").WithLocation(8, 23),
1413
Diagnostic(ErrorCode.
ERR_VariableDeclarationNamedField
, "int field").WithArguments("14.0").WithLocation(14, 21));