Commit 9e05dba
No outdent at eof (scala#22435)
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]1 parent 68e6ec2 commit 9e05dba
File tree
2 files changed
+6
-0
lines changed- compiler/src/dotty/tools/dotc/parsing
- tests/pos
2 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
618 | 619 | | |
619 | 620 | | |
620 | 621 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments