Skip to content

Commit

Permalink
Handle final var lambda variables (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwRavencl committed Sep 13, 2023
1 parent 6a1a2a7 commit eb0d739
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,10 @@ protected void visitLambdaExpression(LambdaExpressionTree node, boolean statemen
token(",");
builder.breakOp(" ");
}
scan(parameter, null);
visitVariables(
ImmutableList.of(parameter),
DeclarationKind.NONE,
inlineAnnotationDirection(parameter.getModifiers()));
first = false;
}
if (parens) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class I959 {
public void test() {
new File(".").listFiles((final var dir, final var name) -> true);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class I959 {
public void test() {
new File(".").listFiles((final var dir, final var name) -> true);
}
}

0 comments on commit eb0d739

Please sign in to comment.