Skip to content

Conversation

@jjonescz
Copy link
Member

Fixes #78054.

@jjonescz jjonescz added Area-Compilers Feature - Run File #: and #! directives and file-based C# programs labels Apr 17, 2025
@jjonescz jjonescz requested a review from a team April 17, 2025 09:59
@ghost ghost added the untriaged Issues and PRs which have not yet been triaged by a lead label Apr 17, 2025
@jjonescz jjonescz marked this pull request as ready for review April 17, 2025 12:41
@jjonescz jjonescz requested review from a team as code owners April 17, 2025 12:41
VerifyTrivia();
UsingTree(source, options,
// (1,2): error CS1024: Preprocessor directive expected
// (1,2): error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the directive is the first non-whitespace character on the line in this case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, that this is somewhat confusing, though I'm not totally sure its worth fixing.

Copy link
Member

@RikkiGibson RikkiGibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am satisfied with the change as it is but you could include a more specific diagnostic message if you wish.

@arunchndr arunchndr merged commit c9019e0 into dotnet:main Apr 18, 2025
28 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Apr 18, 2025
@jjonescz jjonescz deleted the shebang branch April 18, 2025 19:08
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Feature - Run File #: and #! directives and file-based C# programs untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShebangDirective should be unconditionally parsed

4 participants