-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Labels
Area-CompilersFeature - Run File#: and #! directives and file-based C# programs#: and #! directives and file-based C# programs
Milestone
Description
Version Used: main (7ebe9bf)
Steps to Reproduce:
#if false
System.Console.WriteLine("""
#:sdk test
""");
#endifExpected Behavior: No error reported.
Actual Behavior:
// /Program.cs(4,6): error CS9298: '#:' directives can be only used in file-based programs ('-features:FileBasedProgram')
// #:sdk test
Diagnostic(ErrorCode.ERR_PPIgnoredNeedsFileBasedProgram, ":").WithLocation(4, 6),
// /Program.cs(4,6): error CS9299: '#:' directives cannot be after '#if' directive
// #:sdk test
Diagnostic(ErrorCode.ERR_PPIgnoredFollowsIf, ":").WithLocation(4, 6)Metadata
Metadata
Assignees
Labels
Area-CompilersFeature - Run File#: and #! directives and file-based C# programs#: and #! directives and file-based C# programs