Open
Description
Compiler version
3.6.3-RC2, 3.6.4-RC1-bin-20241231-1f0c576-NIGHTLY
Minimized code
trait I0 {
}
trait I1 extends I0 {
}
trait I2 extends I0, I1 {
}
class A1 {
public static void main(String[] args) {
Class<?>[] interfaces = I2.class.getInterfaces();
for (Class<?> anInterface : interfaces) {
System.out.println(anInterface);
}
}
}
Output
interface I1
Expectation
Here I want I0
and I1
in interfaces
in Java code. But only I1
occurs here.
The code I2 extends I0
seems useless but it is written in this way to quickly obtain I0
through reflection.
Additionally, if we write a Java interface I2Java
like the following code, both I0
and I1
occurs.
interface I2Java extends I0, I1 {
}