Permalink
Browse files

[t/spec] test for RT #67932

git-svn-id: http://svn.pugscode.org/pugs@30432 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent f320cbb commit ff7d3bf90bfefcc5092084b0b30b66d3495576a8 moritz committed Apr 21, 2010
Showing with 12 additions and 1 deletion.
  1. +12 −1 S06-signature/code.t
View
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 6;
+plan 8;
# TODO: move this test to closure-parameters.t if it works in the future
@@ -37,4 +37,15 @@ is tester2({ 'block' }), 1, 'Can pass a block to a &parameter';
"Can't pass something that isn't typed as returning Callable";
}
+# RT #67932
+{
+ my $tracker;
+ sub foo(&foo = &foo) {
+ $tracker = &foo
+ };
+ lives_ok { foo },
+ 'can call a sub with a code object defaulting to something of its own name';
+ ok !$tracker.defined, 'the inner &foo is undefined (scoping)';
+}
+
# vim: ft=perl6

0 comments on commit ff7d3bf

Please sign in to comment.