From d435dfbbcca6d23dd37d7fcac2b948b3903de73a Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Tue, 7 Jan 2025 21:09:59 -0600 Subject: [PATCH] Make the fix a little more defensive --- .../src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java b/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java index 757ed9d087..5aa54037a6 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java +++ b/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java @@ -1267,7 +1267,12 @@ private void pushLambdaExpressionLocalsIntoMethodScope(LambdaExpression x, if (syntheticArguments != null) { MethodScope scope = x.getScope(); for (SyntheticArgumentBinding sa : syntheticArguments) { - VariableBinding[] path = scope.getEmulationPath(sa); + VariableBinding[] path; + if (sa.actualOuterLocalVariable == null) { + path = scope.getEmulationPath(sa); + } else { + path = scope.getEmulationPath(sa.actualOuterLocalVariable); + } assert path.length == 1 && path[0] instanceof LocalVariableBinding; JParameter param = it.next(); curMethod.locals.put((LocalVariableBinding) path[0], param);