This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
handle errors in gen_constant_list
authorZefram <zefram@fysh.org>
Sun, 22 Jan 2017 03:20:08 +0000 (03:20 +0000)
committerZefram <zefram@fysh.org>
Sun, 22 Jan 2017 03:20:08 +0000 (03:20 +0000)
commit3a0fe090c1f24f4a3748d00616b87eb4c8dd4475
treebf63ee95c0c142548fc0d31d4a4afa90a643ad9e
parentb949b68f22c917863062bdb655e0e956abeca90d
handle errors in gen_constant_list

When the attempt to constant-fold a list generates an error, that
error should not be signalled at compile time, but merely abort the
attempt at constant folding, so that the error will occur naturally
at runtime.  This is achieved by wrapping the compile-time execution in
gen_constant_list() in a fake eval block.  This brings it in line with
the scalar fold_constants().  Fixes [perl #129320].
op.c
t/comp/fold.t