summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2010-04-09 12:25:54 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2010-04-13 11:14:15 +0200
commit08fe1c446dfd7f69d072837b13864047af619591 (patch)
treea7275849d83986b4afcb9247460a5a0049d7acf6 /op.c
parent2e76d32eb84e130b51bc1053ceb2e4d372424f82 (diff)
downloadperl-08fe1c446dfd7f69d072837b13864047af619591.tar.gz
when(scalar) without argument should be a syntax error [perl #74114]
Diffstat (limited to 'op.c')
-rw-r--r--op.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/op.c b/op.c
index 9c94cc8c27..76eb16f74e 100644
--- a/op.c
+++ b/op.c
@@ -5282,14 +5282,11 @@ S_looks_like_bool(pTHX_ const OP *o)
&& looks_like_bool(cLOGOPo->op_first->op_sibling));
case OP_NULL:
+ case OP_SCALAR:
return (
o->op_flags & OPf_KIDS
&& looks_like_bool(cUNOPo->op_first));
- case OP_SCALAR:
- return looks_like_bool(cUNOPo->op_first);
-
-
case OP_ENTERSUB:
case OP_NOT: case OP_XOR: