Skip to content

Fix formatter for setter assignment with parenthesized values#17083

Open
mamantoha wants to merge 2 commits into
crystal-lang:masterfrom
mamantoha:fix-formatter-setter-assignment-parenthesized-value
Open

Fix formatter for setter assignment with parenthesized values#17083
mamantoha wants to merge 2 commits into
crystal-lang:masterfrom
mamantoha:fix-formatter-setter-assignment-parenthesized-value

Conversation

@mamantoha

Copy link
Copy Markdown
Contributor

This fixes #13202. The change is based on the previous work by @straight-shoota in #13917, with an additional case for valid code such as:

x.foo=(y).bar

Formatter specs were added for the whitespace variants, the parenthesized receiver case, and a short range regression case.

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:formatter labels Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools:formatter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crystal tool format on 'Range'

2 participants