Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

.count and .arity on multis (RT #76646

  • Loading branch information...
commit afae36a52e3543327cd9aace7e2a29995d0dfe7b 1 parent 37d1b61
@moritz moritz authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 S06-signature/arity.t
View
10 S06-signature/arity.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 48;
+plan 50;
# L<S06/Required parameters/method:>
sub a_zero () { };
@@ -127,4 +127,12 @@ is &o_two.count, 1, 'count on sub with optional and required named params';
dies_ok { a_zero( 'hello', 'world' ) }, 'no matching sub signature';
+{
+ my proto sub a($, $?) { * }
+ my multi sub a($) { 1 }
+ my multi sub a($, $) { 2 }
+ is &a.count, 2, '&multi.count';
+ is &a.arity, 1, '&multi.arity';
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.