-
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
Compiler crash (ClassCastException) with -Ysafe-init #17997
Comments
The project that crashes depends on munit compiled in Scala 3. The crash seems to be a result of this line in the init checker: https://github.com/lampepfl/dotty/blob/894809278a47a5455ee12f5dfb7c16da8d641e6c/compiler/src/dotty/tools/dotc/transform/init/Semantic.scala#L1232C11-L1232C102 val thisValue2 = extendTrace(ref) { resolveThis(thisTp.classSymbol.asClass, thisV, klass) }
|
…checker (#18141) Issue #17997 reported a minimized example that crashed the object instance initialization checker. That checker was fixed in #18069. However, a similar example also crashes the global object initialization checker. This PR adds a test that exhibits this crash in the global object initialization checker.
Compiler version
3.3.0
Minimized code
Full code is at https://github.com/durban/dotty-crash
Output (click arrow to expand)
Note:
-Ysafe-init
seems to be required for the crash to happen.The text was updated successfully, but these errors were encountered: