Skip to content

Commit

Permalink
Merge pull request #3857 from rakudo/ambiguous-is-default
Browse files Browse the repository at this point in the history
Streamline X::Multi::Ambiguous listing
  • Loading branch information
lizmat committed Aug 24, 2020
2 parents 86bac5a + b8121ce commit b005230
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core.c/Exception.pm6
Expand Up @@ -2771,7 +2771,10 @@ my class X::Multi::Ambiguous is Exception {
@priors = flat "Earlier failures:\n", @priors, "\nFinal error:\n " if @priors;
@priors.join ~ join "\n",
"Ambiguous call to '$.dispatcher.name()$cap'; these signatures all match:",
@.ambiguous.map(*.signature.raku)
@.ambiguous.map: {
my $sig := .signature.raku.substr(1).subst(/ \s* "-->" <-[)]>+ /);
.?default ?? " $sig is default" !! " $sig"
}
}
}

Expand Down

0 comments on commit b005230

Please sign in to comment.