-
Notifications
You must be signed in to change notification settings - Fork 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
The compiler crashes if I remove an unused private opaque type #14076
Comments
I know this is not a good bug report. But this bug is too mysterious to minimize. |
I also suspected it's due to some local cache. However, I can reproduce it in a fresh checkout. |
Add a comment for scala/scala3#14076
It seems that the name or the definition of the opaque type does not matter. Anyway there must be a whatever opaque type otherwise the compiler crashes. For example:This does not crash: https://github.com/Atry/Dsl.scala/actions/runs/1568297818 The commit to trigger the crash: |
I updated the macro, adding some |
Compiler version
3.1.0
Minimized code
I tried hard to minimize the code triggering the crash, and it turned out if I remove this private opaque type definition (Atry/Dsl.scala@6805444), then the compiler crashes:
Output (click arrow to expand)
It did not crash on the previous commit. The build log can also be found here:
I suspect there is a reference to the symbol of the private opaque type somewhere from the macro generated code, because the error happens when compiling
keywords-Fork/src/main/scala/com/thoughtworks/dsl/keywords/Fork.scala
, which contains the macro call at https://github.com/Atry/Dsl.scala/blob/crash/keywords-Fork/src/main/scala/com/thoughtworks/dsl/keywords/Fork.scala#L83 , and the macro is defined at https://github.com/Atry/Dsl.scala/blob/crash/bangnotation/src/main/scala/com/thoughtworks/dsl/bangnotation.scala#L732-L737But it still seems impossible to me. How could macros in another source file be affected because of removing a private opaque type?
The text was updated successfully, but these errors were encountered: