-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: repo-babylon
-
Component/s: core-libs
The code model of `for (int i : List.of(1, 2, 3, 4))` does not handle types, boxing and unboxing correctly.
Lowered code model contains following invalid fragment:
^block_1(%11 : java.type:"java.util.List<java.lang.Integer>"):
%12 : java.type:"java.util.Iterator<int>" = invoke %11 @java.ref:"java.lang.Iterable::iterator():java.util.Iterator";
branch ^block_2;
Related test `TestEnhancedForOp` verifies the code model by interpretation, which is insufficient, as it does not distinguish between boxed and unboxed types.
Lowered code model contains following invalid fragment:
^block_1(%11 : java.type:"java.util.List<java.lang.Integer>"):
%12 : java.type:"java.util.Iterator<int>" = invoke %11 @java.ref:"java.lang.Iterable::iterator():java.util.Iterator";
branch ^block_2;
Related test `TestEnhancedForOp` verifies the code model by interpretation, which is insufficient, as it does not distinguish between boxed and unboxed types.
- links to
-
Review(code-reflection)
openjdk/babylon/750