allan.jacobs@Eng 1997-03-28
algol% cat n0941501.java
interface I1{
int f();
}
interface I2 {
void f() ;
}
interface I3 extends I1,I2 { } // error: Return types conflict.
//class X implements I3 {
//
//}
algol% javac n0941501.java
algol% ls
I1.class I2.class I3.class n0941501.java
Removing the comments from the declaration of class X forces javac
to check properly. But, users might declare their interfaces in
separate files and compile their files separately. So, this is a
compiler bug.
- duplicates
-
JDK-1266552 different return type error not detected
- Closed