You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
objectFoo:valfoo=1// one space on the last line of the file causes a compilation error
Output
[error] 3|// one space on the last line of the file causes a compilation error
[error] |^
[error] |The start of this line does not match any of the previous indentation widths.
[error] |Indentation width of current line : 1 space
[error] |This falls between previous widths: 0 spaces and 2 spaces
[error] one error found
[error] (Compile/ compileIncremental) Compilation failed
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:
Specifically, a last line consisting of a space with no terminal newline.
vim refresher
vim -b last-space.scala
:set noeol
:wq
5 |
| ^
|The start of this line does not match any of the previous indentation widths.
|Indentation width of current line : 1 space
|This falls between previous widths: 0 spaces and 2 spaces
1 error found
Compilation failed
This can be important when copy/pasting code examples
Also, during editing the code, e.g. in IntelliJ when you have compiler-based highlighting, the file tab can "randomly" become red indicating a compilation error.
Probably the same would be in Metals, haven't checked
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: