-
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
Scala 3.4.0 can't load $
symbol classfile
#19702
Comments
As pointed out, the specification states that We might be able to patch the current failure. I will try it. But this would only be a temporary patch. What is the status of the lining rule that detects names containing |
Opened com-lihaoyi/Ammonite#1395 to track progress on Ammonite side. |
This is the PR that is supposed to add this warning #18563 |
Add an ad-hoc patch to make it possible to use the broken `object $` definitions in https://github.com/com-lihaoyi/Ammonite/blob/main/amm/interp/api/src/main/scala/ammonite/Stubs.scala. This is a temporary patch while these definitions get deprecated. There is not guarantee that the semantics of these objects are correct. There is also no way to adapt the spec to allow there definition without breaking the language. For example consider `object $` and `object $$`, how would we know if the `$$.class` is the class of `$$` or the module class of `$`. We need to know this before we read the file. Closes #19702
Compiler version
3.4.0
Minimized code
file: Test.scala
into:
scala-cli package --library Test.scala
into:
file: TestTest.scala
Output (click arrow to expand)
Additional info:
I'm not sure whether we should count this as regression as dollar is reserved for compiler-synthesized identifiers. User programs should not define identifiers which contain ‘$’ characters.
Even tho it affected ammonite:
https://github.com/com-lihaoyi/Ammonite/actions/runs/7914125865/job/21603222806?pr=1394#step:4:3164
Probably caused by changes in f9e8b36
The text was updated successfully, but these errors were encountered: