Skip to content

Comments

Fix implicit-to-explicit-plus conversion in jsonnetfmt#853

Merged
johnbartholomew merged 4 commits intogoogle:masterfrom
johnbartholomew:fmt-bug-809
Feb 24, 2026
Merged

Fix implicit-to-explicit-plus conversion in jsonnetfmt#853
johnbartholomew merged 4 commits intogoogle:masterfrom
johnbartholomew:fmt-bug-809

Conversation

@johnbartholomew
Copy link
Collaborator

@johnbartholomew johnbartholomew commented Feb 24, 2026

Implicit plus and explicit plus have different precedence, so when converting from implicit to explicit plus sometimes it's necessary to introduce parentheses so that the parse tree for the formatted output is correct.

jsonnetfmt previously did not do this. It is only relevant when using the --no-use-implicit-plus option to jsonnetfmt.

Fixes #809

Also related #496

@johnbartholomew johnbartholomew merged commit 5400c70 into google:master Feb 24, 2026
9 checks passed
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.

Implicit plus and explicit plus are non-equivalent due to binding differently

1 participant