[jdk20] Reorder JavacAST child nodes for JCEnhancedForLoop

This commit is contained in:
Rawi01 authored and Reinier Zwitserloot committed 2023-03-22 12:35:53 +01:00
1 parent f87b6716bc
commit 02fe21f27c
1 file changed
+1
+1
View File
@@ -516,6 +516,7 @@ public class JavacAST extends AST<JavacAST, JavacNode, JCTree> {
private JavacNode buildEnhancedForLoop(JCEnhancedForLoop loop) {
if (setAndGetAsHandled(loop)) return null;
List<JavacNode> childNodes = new ArrayList<JavacNode>();
// The order of the child elements is important and must be kept
addIfNotNull(childNodes, buildTree(getVarOrRecordPattern(loop), Kind.STATEMENT));