# New Ticket Created by chromatic
# Please include the string: [perl #39173]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=39173 >
The multi-dispatch signature checking code in src/mmd.c does not know anything
about :flat calls when it constructs the signature tuple for dispatching.
Here is code to demonstrate this:
.sub main :main
.local pmc int_pmc
int_pmc = new .Integer
int_pmc = 3
.local pmc args
args = new .ResizablePMCArray
push args, int_pmc
'foo'( args :flat )
.local pmc string_pmc
string_pmc = new .String
string_pmc = 'hello'
args = new .ResizablePMCArray
push args, string_pmc
'foo'( args :flat )
end
.end
.sub 'foo' :multi(Integer)
print "foo(Integer)\n"
.end
.sub 'foo' :multi(String)
print "foo(String)\n"
.end
I'll add this as a TODO test to t/pmc/mmd.t as soon as I get an RT number.
-- c