-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 8, 8-repo-lambda
-
Component/s: tools
-
b87
-
Verified
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.
- 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
-