This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_multideref: tweak an assertion
authorDavid Mitchell <davem@iabyn.com>
Sat, 18 Feb 2017 10:46:53 +0000 (10:46 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 18 Feb 2017 10:46:53 +0000 (10:46 +0000)
commitd8f2fe0966b076afb4b85eb04d1524b6af37e344
treea04ee71aa85ca4b7418ad21915a024b0a1d04447
parentf62fd06d790b3f8da5a193403a316ebbea86ba52
pp_multideref: tweak an assertion

My recent commit v5.25.9-89-g43dbb3c added an assertion to the effect that
in

    @{ local $a[0]{b}[1] } = 1;

the 'local' could only appear at the end of a block and so asserted that the
next op should be OP_LEAVE. However, this:

    @{1, local $a[0]{b}[1] } = 1;

inserts an OP_LIST before the OP_LEAVE.

Improve the assert to cope with any number of OP_NULL or OP_LISTs before
the OP_LEAVE.
op.c
t/op/multideref.t