8025110: TreeCopier does not correctly copy LabeledStatementTree
Reviewed-by: jjg
Contributed-by: Werner Dietl <wdietl@gmail.com>
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java Thu Sep 19 20:57:37 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java Thu Sep 19 19:18:37 2013 -0700
@@ -234,7 +234,7 @@
public JCTree visitLabeledStatement(LabeledStatementTree node, P p) {
JCLabeledStatement t = (JCLabeledStatement) node;
JCStatement body = copy(t.body, p);
- return M.at(t.pos).Labelled(t.label, t.body);
+ return M.at(t.pos).Labelled(t.label, body);
}
public JCTree visitLiteral(LiteralTree node, P p) {