diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2022-01-20 14:28:04 +0000 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2022-01-20 15:21:23 +0000 |
commit | a3338bfd061893135571d7152e21de53e05154c1 (patch) | |
tree | 95a70f4c2e5f045c663de99250af97186f6d42e8 /t | |
parent | 0b66d70fe7769af01a6bea67bd2ea91b2404eb4b (diff) | |
download | perl-a3338bfd061893135571d7152e21de53e05154c1.tar.gz |
Make sure to rpeep() the body of catch {} blocks
Diffstat (limited to 't')
-rw-r--r-- | t/perf/opcount.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/perf/opcount.t b/t/perf/opcount.t index 2d3f196174..372c47f3d6 100644 --- a/t/perf/opcount.t +++ b/t/perf/opcount.t @@ -675,6 +675,18 @@ test_opcount(0, "multiconcat: local assign", }); { + use feature 'try'; + no warnings 'experimental::try'; + + test_opcount(0, "try/catch: catch block is optimized", + sub { my @a; try {} catch($e) { $a[0] } }, + { + aelemfast_lex => 1, + aelem => 0, + }); +} + +{ use feature 'defer'; no warnings 'experimental::defer'; |