-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b85
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142243 | emb-9 | Srikanth Adayapalam | P3 | Resolved | Fixed | team |
Here qualified anonymous class instance creation expression with diamond is used.
Bound of enclosing class type parameter need to be intersection.
Minimal test case:
interface I {}
class C {}
class B extends C implements I {}
class Test <T extends C & I>{
class A <T>{
public A(T b) {
}
}
public void foo(){
A a = new Test<>().new A<>(new B()){} ;
}
}
It was tested with jdk 9b68 and 9b74
The failing JCK tests are:
lang/EXPR/expr629/expr62902m201111/expr62902m201111.html
- backported by
-
JDK-8142243 Compiler fails with diamond anonymous class creation with intersection bound of enclosing class
-
- Resolved
-
- duplicates
-
JDK-8155701 The compiler fails with an AssertionError: typeSig ERROR
-
- Resolved
-
-
JDK-8191032 compiler fails with java.lang.AssertionError: typeSig ERROR
-
- Closed
-
- relates to
-
JDK-8073593 15.9: Allow diamond to be used with anonymous classes
-
- Closed
-
-
JDK-8133135 Compiler internall error (NPE) on anonymous class defined by qualified instance creation expression with diamond
-
- Closed
-
-
JDK-8062373 Project Coin: diamond and anonymous classes
-
- Closed
-
-
JDK-8304861 typeSig Error for Records
-
- Closed
-