Skip to content

Commit

Permalink
Make sure Code.cando has the same return type as Routine.cando
Browse files Browse the repository at this point in the history
Even though it will always be either a zero or 1 element list
  • Loading branch information
lizmat committed Oct 24, 2018
1 parent a434a18 commit 69533b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Code.pm6
Expand Up @@ -13,7 +13,7 @@ my class Code does Callable { # declared in BOOTSTRAP
method count(Code:D:) { nqp::getattr($!signature,Signature,'$!count') }

method signature(Code:D:) { $!signature }
method cando(Capture:D $c) { $!signature.ACCEPTS($c) }
method cando(Capture:D $c) { $!signature.ACCEPTS($c) ?? (self,) !! () }

proto method prec(|) {*}
multi method prec() { my % }
Expand Down

0 comments on commit 69533b5

Please sign in to comment.