-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 7
-
Component/s: tools
-
b123
-
unknown
-
generic
-
Verified
After fix of 6932671 the compiler rejects the following code:
class JavaApplication6 {
public static <T extends CharSequence> Foo<T> createDeclarationUID(T declaration) {
return (Foo<T>) new FooImpl();
}
public interface Foo<T> {
}
public static final class FooImpl implements Foo<String> {
}
}
class JavaApplication6 {
public static <T extends CharSequence> Foo<T> createDeclarationUID(T declaration) {
return (Foo<T>) new FooImpl();
}
public interface Foo<T> {
}
public static final class FooImpl implements Foo<String> {
}
}
- relates to
-
JDK-6932571 Compiling Generics causing Inconvertible types
-
- Closed
-
-
JDK-6270073 Specification of casts involving final type is too strict
-
- Closed
-
-
JDK-6557279 Tweak provable distinctness
-
- Closed
-