Skip to content

Precedence of certain operations is tampered by formatting. #623

@bmcq-0

Description

@bmcq-0

The formatter currently removes necessary parentheses around certain expressions. Take the following code for example:

return (-X) ^ Y

...is formatted to:

return -X ^ Y

These expressions are NOT the same and this will lead to very obscure issues (-X ^ Y being parsed as -(X ^ Y) and not (-X) ^ Y seems to be not commonly known and will cause issues especially for beginners.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions