-
Bug
-
Resolution: Fixed
-
P3
-
5.0, 7
-
b64
-
unknown, x86
-
generic, solaris_10
-
Verified
class A<T extends A<T>> {
class C {
public T getT() { return null; }
}
}
class B extends A<B> {
public class D extends A<B>.C {}
}
class Test {
void test(B.D d) {
B b = d.getT();
}
}
If all three classes are compiled at the same time, no error occurs. If, after having compiled all classes, only Test is recompiled, the following compiler error occurs:
TestX.java:14: incompatible types
B b = d.getT();
^
required: B
found: A
1 error
class C {
public T getT() { return null; }
}
}
class B extends A<B> {
public class D extends A<B>.C {}
}
class Test {
void test(B.D d) {
B b = d.getT();
}
}
If all three classes are compiled at the same time, no error occurs. If, after having compiled all classes, only Test is recompiled, the following compiler error occurs:
TestX.java:14: incompatible types
B b = d.getT();
^
required: B
found: A
1 error
- duplicates
-
JDK-6340105 java compiler does not recognise implemented method in anonymous class
- Closed