-
Notifications
You must be signed in to change notification settings - Fork 21
Compiler crash for a package object containing a class and companion #5954
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
Comments
@JamesIry said: |
@JamesIry said: |
@JamesIry said: |
@JamesIry said (edited on Jan 9, 2013 10:32:35 PM UTC): package object base {
class B
object B
} |
@JamesIry said: On the second and subsequent compiles, early in the process, we get symbol package$buhB from its class file. Here it has id 6946
Somewhat later we get symbol buhB from Namer, here with id 7260.
Finally, during code gen we get our assert saying that symbols 6946 and 7260 are overloaded alternatives. Same name, same type, same owner.
So, Namer tried to look up buhB, didn't find it, created #7260. Later #7260 was renamed to package$buhB and by then the damage was done. I don't yet know where the name gets changed. Some investigation I need to do: do all inner classes get loaded with mangled name symbols? Or is that something special about objects inside package objects? If the later, is that deliberate or a mistake? If the former, then shouldn't Namer be figuring out the mangling in order to do the lookup properly? |
@adriaanm said (edited by @JamesIry on Jan 14, 2013 7:30:08 PM UTC): |
@JamesIry said: |
@JamesIry said: |
@JamesIry said: |
@JamesIry said:
Which is one of the things mentioned in the notes for #4695. |
@adriaanm said:
|
@paulp said: |
@adriaanm said: |
@JamesIry said: I'm de-scheduling this one from RC3 and opening another ticket for suppressing the new warnings. If Paul (or whoever) discovers that the fix for this bug is low enough risk after all (and binary compatible) then we can schedule a back-port to 2.10.x and eliminate the warning entirely. |
@retronym said: package p1 {
object `package` {
implicit class Foo(a: Any)
object Foo
}
}
|
@retronym said: |
It is solved directly now.
When I compile the following compilation unit, the compiler crashes upon the third compilation. I do not delete the generated class files between the compiler runs.
The first compiler run is fine, the second generates a message regarding a suppressed failed assert, and on the third run the compiler crashes.
The text was updated successfully, but these errors were encountered: