When we allow return to have surrounding parentheses when containing comparison operators we are not correctly handling the case where the values contain array sufffixes. Squash them.
Unified · Split
| @@ -2016,7 +2016,11 @@ sub process { · 2015 unmodified lines | |||
| 2016 | 2016 | ||
| 2017 | # Flatten any parentheses | 2017 | # Flatten any parentheses |
| 2018 | $value =~ s/\)\(/\) \(/g; | 2018 | $value =~ s/\)\(/\) \(/g; |
| 2019 | while ($value !~ /(?:$Ident|-?$Constant)\s*$Compare\s*(?:$Ident|-?$Constant)/ && $value =~ s/\([^\(\)]*\)/1/) { | 2019 | while ($value =~ s/\[[^\{\}]*\]/1/ || |
| 2020 | $value !~ /(?:$Ident|-?$Constant)\s* | ||
| 2021 | $Compare\s* | ||
| 2022 | (?:$Ident|-?$Constant)/x && | ||
| 2023 | $value =~ s/\([^\(\)]*\)/1/) { | ||
| 2020 | } | 2024 | } |
| 2021 | 2025 | ||
| 2022 | if ($value =~ /^(?:$Ident|-?$Constant)$/) { | 2026 | if ($value =~ /^(?:$Ident|-?$Constant)$/) { |