Skip to content

Commit

Permalink
[t/spec] tests for RT #63744
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@25777 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Mar 9, 2009
1 parent 6512730 commit 9543526
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S06-signature/arity.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 45;
plan 47;

# L<S06/Required parameters/method:>
sub a_zero () { };
Expand Down Expand Up @@ -115,3 +115,12 @@ is &o_two.count, 3, 'count on sub with optional and required named params';
is { $^a,$^b,$^c; my $k }.count, 3,
"additional my() vars don't influence .count calculation (2-3)";
}

# used to be a bug in Rakudo, RT #63744
{
sub indirect-count(Code $c) { +$c.signature.params; }
my $tester = -> $a, $b, $c? { ... };
is +$tester.signature.params, 3, '+$obj.signature.params work';
is +$tester.signature.params, indirect-count($tester),
'... also when passed to a sub first';
}

0 comments on commit 9543526

Please sign in to comment.