summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser_helper.ml
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-03-31 14:11:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-03-31 14:11:26 +0000
commitff615edef2d11617dffa13de037991ae86ff3f70 (patch)
tree030f0d6c23b02c31590cf08f82404e25bc990781 /perl_checker.src/parser_helper.ml
parent3bd90b9fb76bd1543a3b62214f7e859b399570bc (diff)
downloadperl-MDK-Common-ff615edef2d11617dffa13de037991ae86ff3f70.tar
perl-MDK-Common-ff615edef2d11617dffa13de037991ae86ff3f70.tar.gz
perl-MDK-Common-ff615edef2d11617dffa13de037991ae86ff3f70.tar.bz2
perl-MDK-Common-ff615edef2d11617dffa13de037991ae86ff3f70.tar.xz
perl-MDK-Common-ff615edef2d11617dffa13de037991ae86ff3f70.zip
in "$a ? $a : xxx", "xxx" can need short circuit
(even if i don't think any value which is_a_scalar can need_short_circuit)
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r--perl_checker.src/parser_helper.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml
index b95622e..a60cb79 100644
--- a/perl_checker.src/parser_helper.ml
+++ b/perl_checker.src/parser_helper.ml
@@ -431,7 +431,7 @@ let check_ternary_paras(cond, a, b) =
in
if dont_need_short_circuit a || is_same_fromparser cond a then check_ternary_para b;
if dont_need_short_circuit b || is_same_fromparser cond b then check_ternary_para a;
- if is_same_fromparser cond a && dont_need_short_circuit b && is_a_scalar a && is_a_scalar b then warn_rule "you can replace \"$foo ? $foo : $bar\" with \"$foo || $bar\"";
+ if is_same_fromparser cond a && is_a_scalar a && is_a_scalar b then warn_rule "you can replace \"$foo ? $foo : $bar\" with \"$foo || $bar\"";
[ cond; a; b ]
let check_unneeded_var_dollar_ esp =