# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #64922]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=64922 >


This might be in RT already, but I didn't find it, so...

<ihrd> rakudo: multi foo (@a) { 1 }; multi foo ($a, %h?) { 2 }; say
foo(<1 2 3>);
<p6eval> rakudo 69b318: OUTPUT«Ambiguous dispatch to multi 'foo'.
Ambiguous candidates had signatures:␤:(Positional.new() @a)␤:(Any $a,
Associative.new() %h?) [...]
* masak submits rakudobug

As for arity, both methods can match. But the first candidate has a
type constraint Positional on its first parameter, so it should be
narrower than the second one, which doesn't. Therefore, the dispatch
shouldn't be ambiguous, and the first candidate should be called.

Reply via email to