6807255: LineNumberTable wrong if enhanced-for-loops are used

End position of iterable for-each loop was not set properly

Reviewed-by: jjg
This commit is contained in:
Maurizio Cimadamore 2009-03-05 17:25:13 +00:00
parent 5ff31e060f
commit 938af6ca9f

View File

@ -3012,6 +3012,7 @@ public class Lower extends TreeTranslator {
vardefinit).setType(tree.var.type);
indexDef.sym = tree.var.sym;
JCBlock body = make.Block(0, List.of(indexDef, tree.body));
body.endpos = TreeInfo.endPos(tree.body);
result = translate(make.
ForLoop(List.of(init),
cond,