Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Show an empty sig for what it really is
Make this MMD dispatch error a bit clearer, I hope:
$ perl6 -e 'multi a() { ... }; multi a(*%twiddles) { ... }; a'
Ambiguous call to 'a'; these signatures all match:
:(*%_)
:(*%twiddles)
  • Loading branch information
lizmat committed May 6, 2015
1 parent 4752e70 commit 6640006
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/Signature.pm
Expand Up @@ -91,7 +91,7 @@ my class Signature { # declared in BOOTSTRAP
# XXX TODO: Parameter separators.
multi method perl(Signature:D:) {
# Opening.
my $perl = ':(';
my $perl = '';

# Parameters.
my $params = self.params();
Expand All @@ -108,8 +108,9 @@ my class Signature { # declared in BOOTSTRAP
if !nqp::isnull($!returns) && $!returns !=:= Mu {
$perl ~= ' --> ' ~ $!returns.perl
}
# Closer.
$perl ~ ')'

# Finalize.
$perl ?? ":($perl)" !! ":(*%_)"
}

multi method gist(Signature:D:) {
Expand Down

0 comments on commit 6640006

Please sign in to comment.