Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
:() sigs are more like block sigs than sub sigs
  • Loading branch information
lizmat committed Mar 4, 2016
1 parent 3a1ef78 commit 27010e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions S02-names-vars/signature.t
Expand Up @@ -39,21 +39,21 @@ plan 13;

# &sub.signature should return a Signature object
{
sub foo1 ($a, $b) {} #OK not used
my $foo = -> $a, $b {} #OK not used
my $signature = :($a, $b);

ok ~$signature,
"a signature stringifies";
ok $signature eqv &foo1.signature,
ok $signature eqv $foo.signature,
"a subroutine's signature can be accessed via .signature (1)";
}

# Same as above, but more complex
{
my sub foo (Num $a, $b?, *@rest) {} #OK not used
my $foo = -> Num $a, $b?, *@rest {} #OK not used
my $signature = :(Num $a, $b?, *@rest);

ok $signature eqv &foo.signature ,
ok $signature eqv $foo.signature ,
"a subroutine's signature can be accessed via .signature (2)";
}

Expand Down

0 comments on commit 27010e5

Please sign in to comment.