Skip to content

fix(parser): keep parenthesized multi-param lambda as first function arg - #2455

Open
ivanclarksoft wants to merge 2 commits into
JSQLParser:masterfrom
ivanclarksoft:fix/lambda-first-arg-2195
Open

fix(parser): keep parenthesized multi-param lambda as first function arg#2455
ivanclarksoft wants to merge 2 commits into
JSQLParser:masterfrom
ivanclarksoft:fix/lambda-first-arg-2195

Conversation

@ivanclarksoft

Copy link
Copy Markdown

Summary

array_map((x,y,z) -> x + y, …) incorrectly kept only the parameter list (x, y, z) as the first argument. Tokens for -> body were consumed, then discarded by an unconditional reassignment after ParenthesedExpressionList().

Changes

  • In PrimaryExpression(), make the lambda branch and the plain-list assignment mutually exclusive.
  • Add regression test testLambdaFirstArgumentIssue2195.

Test plan

  • mvn -Dtest=LambdaExpressionTest test

Fixes #2195

lisbon-craigb-13142 added 2 commits August 8, 2026 14:47
Signed-off-by: lisbon-craigb-13142 <lisbon-craigb-13142@users.noreply.github.com>
Signed-off-by: lisbon-craigb-13142 <lisbon-craigb-13142@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSQLParser 5.1: LambdaExpression parameters error

1 participant