-
Notifications
You must be signed in to change notification settings - Fork 1.1k
a space on the last line of the file causes a compilation error #22332
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
Comments
Specifically, a last line consisting of a space with no terminal newline. vim refresher
where
|
This can be important when copy/pasting code examples |
Merged
KacperFKorban
pushed a commit
that referenced
this issue
Jan 29, 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 ```
tgodzik
pushed a commit
to scala/scala3-lts
that referenced
this issue
Apr 21, 2025
Fixes scala#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 ``` [Cherry-picked 81e057a]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
Scala compiler version 3.3.3 or later
Minimized code
Output
The compilation error results in red code in IntelliJ IDEA
Expectation
The code should compile without errors
The text was updated successfully, but these errors were encountered: