diff options
-rw-r--r-- | t/op/closure.t | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/op/closure.t b/t/op/closure.t index 569724f62d..9a4e50dc2a 100644 --- a/t/op/closure.t +++ b/t/op/closure.t @@ -815,4 +815,14 @@ SKIP: { 'closures in source filters do not interfere with pad names'; } +sub { + my $f; + sub test_ref_to_unavailable { + my $ref = \$f; + $$ref = 7; + is $f, 7, 'taking a ref to unavailable var should not copy it'; + } +}; +test_ref_to_unavailable(); + done_testing(); |