-
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
Macro-related crash with -Ysafe-init
for test class hierarchy
#19649
Comments
@liufengyun I can confirm that the problem does not occur in the following compiler versions:
And indeed was this problem was previously detected by the community build in #18407 👍 and fixed in #18848. It would be great to backport this fix to the upcoming 3.3.2 or 3.3.3 because as a library author I need to use the compiler version 3.3 (LTS) and safe initialization checking is a helpful feature which I would like to keep using. Thanks. |
I'm not familiar with the process for back-porting. Could you please adivse? /cc: @Kordyjan |
I'm not that familiar with |
The compiler options documentation mentions that it's a private setting with limited support. If this means it should not be considered an official part of the compiler user interface then I can just stop using it and nothing needs to be done. |
I asked people around and now I can confidently say that There is ongoing discussion how should they be treated in LTS (supported, disabled, emitting warning or left as they are right now). I'm leaning on the side of supporting them. I'll update this comment when there will be a decision. |
@Kordyjan Thanks for looking into it 😄 |
Given that #20199 is merged, this can be closed. |
Compiler version
The problem does not occur in the following compiler versions:
Compiler flags
-Ysafe-init
Minimized code
build.sbt
AB.scala
C.scala (test)
Output (click arrow to expand)
[Internal error] unexpected tree
Reproduce
Unpack the attached archive and run the tests:
safe-init-error.tar.gz
Note
Thanks for making a great compiler 😄 .
The text was updated successfully, but these errors were encountered: