Improved detail in secondary import statement error message #17874
alvinj
started this conversation in
Feature Requests
Replies: 3 comments
-
Definitely a bug of some kind. It's too late on a Sunday for me to understand that everything is in
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I also think this is a bug rather than an enhancement, as the compiler should be able to be more helpful At least all "{ expected" should be changed to "{ or : expected" inline with the new syntactic options. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I incorrectly write code like this:
the compiler shows this error message:
As I initially pointed out on Gitter, and Bjorn Regnell clarifies here, the error message could be more helpful, especially when using the significant indentation syntax. Bjorn’s suggests this:
I think it would be even more clear to state that the
package
statement needs to end with a:
and possibly that thetrait
line needs to be indented, but I don’t know what information is available. I’ve seen some other Scala 3 error messages that are really terrific and helpful — varargs, match expressions, trait inheritance, etc. — which is why I mention all of this.Beta Was this translation helpful? Give feedback.
All reactions