Permalink
Browse files

[t/spec] tests for RT #63744

git-svn-id: http://svn.pugscode.org/pugs@25777 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 6512730 commit 9543526f8bd59986f99af0a57ccb949c6e68f862 moritz committed Mar 9, 2009
Showing with 10 additions and 1 deletion.
  1. +10 −1 S06-signature/arity.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 45;
+plan 47;
# L<S06/Required parameters/method:>
sub a_zero () { };
@@ -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.