# New Ticket Created by Stephane Payrard # Please include the string: [perl #76372] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76372 >
I golfed some problematic code to the following : > multi sub f(@p, Range $r? ) { say 1 }; multi sub f([], Range $r) { > say 2 }; f([], 1..2); 2 > multi sub f(@p, Range $r?, Bool :$mod){ say 1 }; multi sub f([], Range $r) { > say 2 }; f([], 1..2); Ambiguous dispatch to multi 'f'. Ambiguous candidates had signatures: :(@p, Range $r?, Bool :mod($mod)) :(Positional (), Range $r) The first line behaves as intended. Adding a named parameter makes the dispatch ambiguous. The second function which was not a candidate seems to become a candidate by adding a named parameter. -- cognominal stef