diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2003-08-10 02:35:30 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-10 17:55:03 +0000 |
commit | 6cbc0cd1d96dba8bcda440e8ed6dde3e7b3a050b (patch) | |
tree | 4be6611e784ab204ab7dc71613919cb9d0d57131 /t/op/closure.t | |
parent | d5a0d2f99e0b4c8cd215ae33ce31786e1b28a247 (diff) | |
download | perl-6cbc0cd1d96dba8bcda440e8ed6dde3e7b3a050b.tar.gz |
Re: [perl #23265] Nested anonymous subs
Message-ID: <20030810003530.GB6547@fdgroup.com>
p4raw-id: //depot/perl@20597
Diffstat (limited to 't/op/closure.t')
-rwxr-xr-x | t/op/closure.t | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/t/op/closure.t b/t/op/closure.t index dd7b50cdef..763e2a74dc 100755 --- a/t/op/closure.t +++ b/t/op/closure.t @@ -13,7 +13,7 @@ BEGIN { use Config; -print "1..184\n"; +print "1..185\n"; my $test = 1; sub test (&) { @@ -641,4 +641,27 @@ f16302(); test { $a{7}->()->() + $a{11}->()->() == 18 }; } +# bugid #23265 - this used to coredump during destruction of PL_maincv +# and its children + +require './test.pl'; + +my $got = runperl( + prog => q[ + print + sub {$_[0]->(@_)} -> ( + sub { + $_[1] + ? $_[0]->($_[0], $_[1] - 1) . sub {"x"}->() + : "y" + }, + 2 + ) + , "\n" + ; + + ], + stderr => 1 +); +test { $got eq "yxx\n" }; |