What operating system are you using, and which version?
[x] Linux / Ubuntu
[x] Linux / Other
[x] macOS
[x] Windows
Describe what the problem is?
Since we fixed the associativity of && and || binary operator, the formatter is now wrongly inserting extra parentheses to sequences with more than 2 operands. And similarly, it will likely remove parentheses changing the associativity.
So for example:
a || b || c
gets formatted as:
a || (b || c)
which is superfluous because of the right-associativity of || already.
What should be the expected behavior?
Parenthesis should only be added / preserved when they do alter the default associativity of those operators.
What Git revision are you using?
d1ba8db889f0dff6d1a12cd4523636749113b566
What operating system are you using, and which version?
Describe what the problem is?
Since we fixed the associativity of
&&
and||
binary operator, the formatter is now wrongly inserting extra parentheses to sequences with more than 2 operands. And similarly, it will likely remove parentheses changing the associativity.So for example:
gets formatted as:
which is superfluous because of the right-associativity of
||
already.What should be the expected behavior?
Parenthesis should only be added / preserved when they do alter the default associativity of those operators.