-
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
Accessing backqouted underscore does not parse but compiles fine in Scala 2.13.x #14746
Comments
_
does not parse but compiles fine in Scala 2.13.x
_
`` does not parse but compiles fine in Scala 2.13.x
_
`` does not parse but compiles fine in Scala 2.13.x
This has a long history on Scala 2, where support was for what version of Java allowed underscore. The dotty behavior is noted at scala/bug#10384 (comment) The import behavior was supported at scala/scala#6218 In a definition scala/scala#7669 I wonder if you're allowed to have a class named underscore. |
What is the use case in scala-cli? |
The problem here seems to be the fact that Scala 2.13 libraries were using |
The fastparse code treats |
Compiler version
I tested with
3.1.1
but it probably applies to all Scala 3 / dotty versionsMinimized code
Output
Compiles on Scala 2.13.8, fails on 3.1.1 with:
Expectation
I know that
_
is not the best name of the method, however, it exists and is used e.g. in Scala CLI.The text was updated successfully, but these errors were encountered: