# New Ticket Created by Adriaan Larmuseau # Please include the string: [perl #125658] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=125658 >
Bug report #124393 states that one cannot use stub multi methods in roles, but multi methods do not work with roles in general. Consider the following example: role A { multi method a(Int , Int --> Mu:D) { False }; multi method a(Bool:D $handle, Int $int --> Mu:D) { False }; } class Test does A { multi method a(Int $stream, Int $int) { True } multi method a(Bool:D $handle, Int $int) { True } } # test my $test = Test.new(); my Bool $b = True; $test.a($b,5); Produces the following output: Ambiguous call to 'a'; these signatures all match: :(Test $: Bool:D $handle, Int $int, *%_) :(Test $: Bool:D $handle, Int $int, *%_) in block <unit> at test.pl:17 For perl6 --version: This is perl6 version 2015.06-293-g27f88c4 built on MoarVM version 2015.06-98-gf22142b