Skip to content

Commit

Permalink
3rd fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-herrmann committed Jun 15, 2024
1 parent 40b09b3 commit 8651ca2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,10 @@ protected boolean triggerRecoveryUponLambdaClosure(Statement statement, boolean
} else {
statementEnd = statement.sourceEnd;
}
boolean insideType = false;
for (int i = this.elementPtr; i >= 0; --i) {
if (this.elementKindStack[i] == K_TYPE_DELIMITER)
return false;
insideType = true;
if (this.elementKindStack[i] != K_LAMBDA_EXPRESSION_DELIMITER)
continue;
LambdaExpression expression = (LambdaExpression) this.elementObjectInfoStack[i];
Expand Down Expand Up @@ -659,7 +660,7 @@ protected boolean triggerRecoveryUponLambdaClosure(Statement statement, boolean
}
}
}
if (this.snapShotPtr > -1)
if (this.snapShotPtr > -1 && !insideType)
popSnapShot();
return lambdaClosed;
}
Expand Down

0 comments on commit 8651ca2

Please sign in to comment.