Skip to content
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

Java classes that inherit Scala classes cannot be compiled (another case) #22308

Open
XYZboom opened this issue Jan 4, 2025 · 0 comments
Open

Comments

@XYZboom
Copy link

XYZboom commented Jan 4, 2025

Compiler version

3.6.3-RC2, 3.6.4-RC1-bin-20241231-1f0c576-NIGHTLY

Minimized code

trait I0 {
  def func0(): Unit
}
trait I1[T] extends I0 {
  override def func0(): Unit = {}
}
trait I2 extends I1[I2], I0 {
}
open class A0 extends I2 {
}
// FILE: A1.java
public abstract class A1 extends A0 {}

Output

A1.java:3: error: I1 cannot be inherited with different arguments: <> and <I2>
public abstract class A1 extends A0  {
                ^
1 error

Expectation

compile passed.

@XYZboom XYZboom added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 4, 2025
@Gedochao Gedochao added compat:java and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants