Skip to content

Commit

Permalink
Make the fix a little more defensive
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Jan 8, 2025
1 parent 8441988 commit d435dfb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d435dfb

Please sign in to comment.