-
Notifications
You must be signed in to change notification settings - Fork 21
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
2.10 regression: broken static forwarders for non-public methods generated when extending class from different package #6063
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6063?orig=1 |
@SethTisue said: The forwarder should not be generated at all, since O isn't in the java.lang package so the method is inaccessible. |
@SethTisue said:
|
@magarciaEPFL said:
The error reads
|
@SethTisue said: |
@paulp said: |
@paulp said: |
@SethTisue said: |
@adriaanm said: |
@SethTisue said: |
As an example, take java.lang.Throwable as our superclass.
2.10.0-M4 does generate a forwarder, but woe to she who attempts to actually use it:
A quick look with javap shows that the body of the forwarder is confused about the static-ness of the method it's trying to forward to:
My examples don't have package declarations, but I don't think that matters because I hit this in real code and in the real code everything was in packages.
It's true you can avoid the runtime error by simply not attempting to use the broken static forwarder, but I'm afraid that doesn't really solve it because the invalid forwarders may confuse tools. For example, they cause ProGuard to abort and exit when processing my real code.
This appears related to #3452 (which itself has many related tickets).
The text was updated successfully, but these errors were encountered: