summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorVincent Pit <perl@profvince.com>2009-08-04 16:13:28 +0200
committerVincent Pit <perl@profvince.com>2009-08-04 16:13:28 +0200
commitdd3e51dc8ab0e4da0f911ca693aa0ceaaf79318a (patch)
tree039b1ec37ba29057c290a5e43a52fd5be4e4facd /op.c
parentd781deb6546425b0eb8ff14422b0c2fb4352a053 (diff)
downloadperl-dd3e51dc8ab0e4da0f911ca693aa0ceaaf79318a.tar.gz
Promote blocks resulting from constant folding to first-class do { } blocks
This solves [perl #68108]: no retval from sub { if(1){ ... } }
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/op.c b/op.c
index d1ed0807d8..8574f52bfd 100644
--- a/op.c
+++ b/op.c
@@ -4552,6 +4552,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
return newop;
}
op_free(first);
+ if (other->op_type == OP_LEAVE)
+ other = newUNOP(OP_NULL, OPf_SPECIAL, other);
return other;
}
else {