-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve import selector parsing #6019
Comments
This comment has been minimized.
This comment has been minimized.
scalac 's behavior is not backed by the language spec. I think if we want to change this it has to go through the SIP process, and I for one would vote against the change. No need to get more syntactic options for features that occur rarely anyway. |
The parser incorrectly accepts
Also worth mentioning that the linked scalac issue is per spec: backquoted underscore is an identifier, but unadorned underscore is a reserved word. |
This progressed, probably when
|
Scala 2 received upgraded parsing of import selectors, including handling underscore, at scala/scala#6218. There may be something to forward-port.
Comparing Scala 2:
The bad syntax was ignored completely until 2.13.
Edit: the Scala 2 change addresses some but not all issues around use of underscore, and the parsing improvement was just fall-out.
The text was updated successfully, but these errors were encountered: