Closed
Description
Minimized code
$ dotc -explain baddot.scala
-- [E018] Syntax Error: baddot.scala:7:30 --------------------------------------
7 | def g: Int = try 42 finally ;
| ^
| expression expected but ';' found
Explanation
===========
An expression cannot start with ';'.
-- [E129] Potential Issue Warning: baddot.scala:7:21 ---------------------------
7 | def g: Int = try 42 finally ;
| ^
|A pure expression does nothing in statement position; you may be omitting necessary parentheses
Explanation
===========
The pure expression null doesn't have any side effect and its result is not assigned elsewhere.
It can be removed without changing the semantics of the program. This may indicate an error.
1 warning found
1 error found
Output
The pure expression null doesn't have any side effect
Expectation
Awesome error messages should be robust about inputs without any ceremony by the message writer.