-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
B::Deparse: retain () around ! if omitting them would warn
Since 570fa43, we emit precedence warnings if the LHS of a comparison or binding op starts with an unparenthesized logical negation (`!`, as in `!$x == $y`). Explicit parens can be used to avoid the warning (`(!$x) == $y`). Teach B::Deparse to keep these parentheses even if they're not strictly required by operator precedence because we don't want the deparsed code to generate more warnings than the original code. Fixes #22661.
- Loading branch information
Showing
2 changed files
with
61 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters