perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

B::Deparse: retain () around ! if omitting them would warn

Open mauke opened this issue 1 year ago • 0 comments

Since 570fa43328, 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.


  • This set of changes requires a perldelta entry, and it is included.

mauke avatar Oct 15 '24 05:10 mauke