-
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
False-negative: class needs to be abstract when inherits java class and interface #13074
Comments
The Scala compiler only reads Java source files (in mixed compilation) to know their signatures, but it does not produce .class files for them. Java sources are not checked for correctness, many checks are skipped. We delegate checking to the Java compiler, which needs to processe Java sources anyway after mixed compilation. |
@lrytz Yes, I understand the working principle of scalac, which is similar to Kotlin's delegation of Javac to compile Java source code. In this issue, what I want to express is that class |
I (again) overlooked what is Scala code. |
Perhaps the title I gave to the issue was a bit misleading |
I tried this out with Lukas's scala/scala#10580 but no difference. I wasn't in a position to disappear down a rabbit hole or warren. |
Does Scala 3 handle it correctly? |
The bug template needs a new section for |
Perhaps I have made some new discoveries, and this bug may be a Javac bug. Change interface I1 extends I0<Object> {
public default void func(A<Object> a, Object s) {
}
} If change |
Java developers have reproduced this bug in JDK-8347330. But before they fix this bug, Scala2 should also report an error like what Scala3 does. |
Reproduction steps
Scala version: 2.13.15
Problem
The compiler passed the code above.
There should be a
class A0 needs to be abstract
here.The text was updated successfully, but these errors were encountered: