-
Notifications
You must be signed in to change notification settings - Fork 21
Resolve inherited Java static method #7386
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
Imported From: https://issues.scala-lang.org/browse/SI-7386?orig=1 |
@adriaanm said: scala> MyClassBase.myStaticBaseMethod()
java.lang.IllegalAccessError: tried to access class MyClassBase from class
at .<init>(<console>:8) |
@SethTisue said: As for the original issue, I suggest we simply close it as "Not a Bug". Scala simply doesn't have the Java concept of statics. We have companion objects instead, but no inheritance relationship exists between the companion objects of a subclass and a superclass. Following Java here and allowing You can call the method through the superclass, so I don't see that any actual interop problem arises here. |
Stefano Baghino (stefanobaghino) said: |
@lrytz said: |
@lrytz do you agree this should be closed as "not a bug"? scala/scala#5606 doesn't aim to "fix" this ticket, right? |
Yes, I agree |
a pull request with that would be welcome, as far as I can see. (I don't think it merits an additional ticket — there are too many improvable error messages to have individual tickets for them all) |
Inherit static method from Java class is not recognized by Scala class
Here there is an small and simple example:
The text was updated successfully, but these errors were encountered: