Skip to content

Commit

Permalink
Add test for RT #78240
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Jul 8, 2015
1 parent 104d08f commit 08b64b7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S06-signature/arity.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 52;
plan 54;

# L<S06/Required parameters/method:>
sub a_zero () { };
Expand Down Expand Up @@ -138,4 +138,12 @@ dies-ok { EVAL("a_zero( 'hello', 'world' )") }, 'no matching sub signature';
is (-> *@a { }).count, Inf, 'slurpy positional causes infinite count'; #OK not used
is (-> *%a { }).count, 0, 'slurpy named causes no count change'; #OK not used

# RT #78240
{
sub a ($a, $b, $c) { 42 }
my &b = &a.assuming(1);
is &a.arity, 3, 'arity of original sub is 3';
is &b.arity, 2, '.assuming(1) reduces arity by 1';
}

# vim: ft=perl6

0 comments on commit 08b64b7

Please sign in to comment.