diff options
author | David Mitchell <davem@iabyn.com> | 2016-06-27 14:56:09 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-06-27 14:56:09 +0100 |
commit | 36efb5a67d73cc824ada76aaa2e3b03bda5cdc60 (patch) | |
tree | 0d4e2551dde807f54a5eeb8fd5056464240b49b5 /op.c | |
parent | f4484b87a82daea7be100df3744515a1bdd437a1 (diff) | |
download | perl-36efb5a67d73cc824ada76aaa2e3b03bda5cdc60.tar.gz |
S_lvref() OP_[AH]SLICE => OP_LVREFSLICE flag issue
RT #128252 Assert fail in op.c
In S_lvref(), when it's converting an OP_ASLICE or OP_HSLICE into a
OP_LVREFSLICE op, it clears all private flags except those supported by
both ops. Except that it got it wrong. OPpLVREF_ELEM isn't a valid flag
for OP_[AH]SLICE (that bit corresponds to OPpSLICEWARNING for [ah]slice)
and that bit isn't valid for OP_LVREFSLICE. So don't preserve that bit.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2744,7 +2744,7 @@ S_lvref(pTHX_ OP *o, I32 type) case OP_ASLICE: case OP_HSLICE: OpTYPE_set(o, OP_LVREFSLICE); - o->op_private &= OPpLVAL_INTRO|OPpLVREF_ELEM; + o->op_private &= OPpLVAL_INTRO; return; case OP_NULL: if (o->op_flags & OPf_SPECIAL) /* do BLOCK */ |