Details
-
Bug
-
Resolution: Fixed
-
P2
-
8, 8-repo-lambda
-
b87
-
Verified
Description
The following program runs w/o exceptions:
import java.util.*;
class Test {
public static void main(String[] args) {
Runnable r = (List<?> & Runnable)new ArrayList<String>();
}
}
Note that, if the types are swapped in the intersection, the program fails with CCE.
import java.util.*;
class Test {
public static void main(String[] args) {
Runnable r = (List<?> & Runnable)new ArrayList<String>();
}
}
Note that, if the types are swapped in the intersection, the program fails with CCE.
Attachments
Issue Links
- relates to
-
JDK-8209022 Missing checkcast when casting to type parameter bounded by intersection type
- Closed
-
JDK-8263642 javac emits duplicate checkcast for first bound of intersection type in cast
- Closed