35 references to ERR_BadDirectivePlacement
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
1172
or ErrorCode.
ERR_BadDirectivePlacement
Parser\DirectiveParser.cs (1)
116
hash = this.AddError(hash, ErrorCode.
ERR_BadDirectivePlacement
);
Parser\Lexer.cs (1)
2012
var error = new SyntaxDiagnosticInfo(offset: 0, width: 1, code: ErrorCode.
ERR_BadDirectivePlacement
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\CompilationAPITests.cs (2)
654
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 21),
731
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 21),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (30)
LexicalAndXml\LexicalErrorTests.cs (1)
657
ParserErrorMessageTests.ParseAndValidate(test, Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#"));
LexicalAndXml\PreprocessorTests.cs (2)
2428
VerifyErrorCode(node, (int)ErrorCode.
ERR_BadDirectivePlacement
); // CS1040
2589
VerifyErrorCode(node, (int)ErrorCode.
ERR_BadDirectivePlacement
);
Parsing\IgnoredDirectiveParsingTests.cs (4)
191
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 2)
197
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 2),
724
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 1));
759
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(2, 1));
Parsing\ParsingErrorRecoveryTests.cs (13)
8122
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 5),
8172
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 6),
8222
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 6),
8276
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 5),
8369
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(4, 15));
8450
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(4, 15));
8529
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 15));
8571
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(2, 15));
8610
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 15),
8613
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(2, 15),
8638
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(200, 15),
8662
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(2, 15),
8680
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(2, 15),
Parsing\ScriptParsingTests.cs (6)
9675
new ErrorDescription { Code = (int)ErrorCode.
ERR_BadDirectivePlacement
, Line = 1, Column = 2 });
9678
new ErrorDescription { Code = (int)ErrorCode.
ERR_BadDirectivePlacement
, Line = 2, Column = 1 });
9681
new ErrorDescription { Code = (int)ErrorCode.
ERR_BadDirectivePlacement
, Line = 2, Column = 1 });
9684
new ErrorDescription { Code = (int)ErrorCode.
ERR_BadDirectivePlacement
, Line = 2, Column = 1 });
9687
new ErrorDescription { Code = (int)ErrorCode.
ERR_BadDirectivePlacement
, Line = 1, Column = 3 });
9701
new ErrorDescription { Code = (int)ErrorCode.
ERR_BadDirectivePlacement
, Line = 1, Column = 1 });
Parsing\TopLevelStatementsParsingTests.cs (2)
1329
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 21),
1674
Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 21),
Syntax\SyntaxNodeTests.cs (2)
364
TestBase.Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 17));
492
TestBase.Diagnostic(ErrorCode.
ERR_BadDirectivePlacement
, "#").WithLocation(1, 5),