Skip to content

No outdent at eof #22435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Jan 22, 2025

Fixes #22332

The reference does not mention <eof>. <outdent> insertion does not require a particular next token, though some next tokens affect it (that is, leading infix or tokens that close an indentation region). It does require a "first token on the next line", for which we may take <eof> as the lack of a token.

Of course, ordinary error messages say eof.

The same text with an opening brace is unchanged:

5 |
  | ^
  | '}' expected, but eof found

@som-snytt som-snytt force-pushed the issue/22332-final-space branch from b734acd to a2efb03 Compare January 27, 2025 18:32
@som-snytt som-snytt marked this pull request as ready for review January 27, 2025 18:32
@som-snytt
Copy link
Contributor Author

rebased

@som-snytt som-snytt added the fasttrack Simple fix. Reviewer should merge or apply additional changes directly. label Jan 27, 2025
Copy link
Member

@KacperFKorban KacperFKorban left a comment

Choose a reason for hiding this comment

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

LGTM!

@KacperFKorban KacperFKorban merged commit 81e057a into scala:main Jan 29, 2025
29 checks passed
@som-snytt som-snytt deleted the issue/22332-final-space branch January 29, 2025 14:46
@WojciechMazur WojciechMazur added this to the 3.7.0 milestone Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fasttrack Simple fix. Reviewer should merge or apply additional changes directly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

a space on the last line of the file causes a compilation error
3 participants