-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
better-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement
Description
Compiler version
3.7
Minimized code
//> using scala 3.7.1
@main def test = println:
true
&&
try java.lang.Boolean.valueOf("true")
Output
4 | &&
| ^^
| end of statement expected but identifier found
Expectation
The problem is that the infix op is not followed by a "simple" expression.
The error message could say so.
It's not a leading infix issue per se:
3 | true && try java.lang.Boolean.valueOf("true")
| ^^
| end of statement expected but identifier found
but I wanted the pun on misleading.
When the op is at EOL, it looks like I'm using the syntax wrong, that is, it makes me think some other syntax rule applies or I just don't know how to code in Scala 3.
Metadata
Metadata
Assignees
Labels
better-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement