Skip to content

[fix] Don't duplicate parens for block-only callers that shadow variable names - #949

Merged
reese merged 2 commits into
trunkfrom
reese-920
Jul 24, 2026
Merged

[fix] Don't duplicate parens for block-only callers that shadow variable names#949
reese merged 2 commits into
trunkfrom
reese-920

Conversation

@reese

@reese reese commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Closes #920

Passing a block (like a(&b)) is kinda janky in Prism, since they're handled separately from the rest of the argument list, so they're handled specially in a few places. These bits of special handling were skipped in cases where the method name is also in scope as a variable name, but we shouldn't be skipping them, so this PR updates these bits of handling to never skip this early-return handling when emitting argument lists with only a block arg.

@reese
reese merged commit dbe818c into trunk Jul 24, 2026
8 checks passed
@reese
reese deleted the reese-920 branch July 24, 2026 19:25
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.

Behavior Change: a(&b) Rewritten as a()(&b), a.(&d) Rewritten as a.()(&d)

2 participants