From 9543526f8bd59986f99af0a57ccb949c6e68f862 Mon Sep 17 00:00:00 2001 From: moritz Date: Mon, 9 Mar 2009 22:55:49 +0000 Subject: [PATCH] [t/spec] tests for RT #63744 git-svn-id: http://svn.pugscode.org/pugs@25777 c213334d-75ef-0310-aa23-eaa082d1ae64 --- S06-signature/arity.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/S06-signature/arity.t b/S06-signature/arity.t index c30ea7049e..5a1b373a6d 100644 --- a/S06-signature/arity.t +++ b/S06-signature/arity.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 45; +plan 47; # L 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'; +}