summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-04 04:45:13 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-04 04:45:13 +0000
commit354992b151c6d0f4f02b9e65e8ba749a959e700d (patch)
tree128289cffb439d7ecf6f963c11291dd4447397d7 /t
parente194c14e895d209252cde093bbc79234adb5b8de (diff)
downloadperl-354992b151c6d0f4f02b9e65e8ba749a959e700d.tar.gz
fix pad_alloc panic from C<my $w; sub { my($i) = @_; sub { $w } }>
p4raw-id: //depot/perl@4970
Diffstat (limited to 't')
-rwxr-xr-xt/op/closure.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/op/closure.t b/t/op/closure.t
index 52d2272b80..c691d6f034 100755
--- a/t/op/closure.t
+++ b/t/op/closure.t
@@ -12,7 +12,7 @@ BEGIN {
use Config;
-print "1..170\n";
+print "1..171\n";
my $test = 1;
sub test (&) {
@@ -172,6 +172,15 @@ test {
$foo[4]->()->(4)
};
+{
+ my $w;
+ $w = sub {
+ my ($i) = @_;
+ test { $i == 10 };
+ sub { $w };
+ };
+ $w->(10);
+}
# Additional tests by Tom Phoenix <rootbeer@teleport.com>.