Permalink
Browse files

Add test for multi-dispatch involving a | in the signature.

  • Loading branch information...
1 parent 160bc8b commit f1c60ac546acc50893409699f1e13658905c2469 @jnthn jnthn committed Jan 13, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 S06-multi/syntax.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 39;
+plan 40;
# L<S06/Routine modifiers/>
# L<S06/Parameters and arguments/>
@@ -147,6 +147,10 @@ ok(~&foo ~~ /foo/, 'a multi stringifies sensibly');
dies_ok { $x(23) }, '... and does not contain the full multiness';
}
+multi with_cap($a) { $a }
+multi with_cap($a,$b,|$cap) { return with_cap($a + $b, |$cap) }
+is with_cap(1,2,3,4,5,6), 21, 'captures in multi sigs work';
+
done;
# vim: ft=perl6

0 comments on commit f1c60ac

Please sign in to comment.