-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
P4
-
None
-
Affects Version/s: 5.0
-
Component/s: tools
-
generic
-
generic
This program doesn't compile
public class X {
public interface SuperInterface<A> {
}
public interface SubInterface extends SuperInterface<String> {
public String getString();
}
private SuperInterface< ? extends SuperInterface> x = null;
public void f() {
((SubInterface) this.x).getString();
}
}
###@###.### 2005-06-08 16:13:28 GMT
public class X {
public interface SuperInterface<A> {
}
public interface SubInterface extends SuperInterface<String> {
public String getString();
}
private SuperInterface< ? extends SuperInterface> x = null;
public void f() {
((SubInterface) this.x).getString();
}
}
###@###.### 2005-06-08 16:13:28 GMT
- duplicates
-
JDK-4916620 legal cast is rejected
-
- Closed
-