I saw some unexpected program behavior after autoformatting, and tracked it down to the formatter removing necessary parentheses in math expressions, which changes the order of operations.
Simple example:
x = 20 - (2 + 3 * 4)
autoformats to:
x = 20 - 2 + 3 * 4
Another example:
x = not (true and false)
Autoformats to the logically different expression:
I saw some unexpected program behavior after autoformatting, and tracked it down to the formatter removing necessary parentheses in math expressions, which changes the order of operations.
Simple example:
autoformats to:
Another example:
Autoformats to the logically different expression: