Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #39161] [BUG] :multi fails when .HLL is in effect

0 views
Skip to first unread message

Patrick R . Michaud

unread,
May 18, 2006, 12:21:27 AM5/18/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Patrick R. Michaud
# Please include the string: [perl #39161]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=39161 >


Subroutines with :multi seem to not work properly when used
inside a file with a .HLL declaration. Here's the test case:

$ cat x.pir
.HLL 'Perl6', ''

.sub main :main
$P0 = new .Integer
$P0 = 3
$P9 = 'foo'($P0)

$P0 = new .ResizablePMCArray
push $P0, 4
$P1 = new .String
$P1 = 'hello'
$P9 = 'foo'($P0, $P1)
.end

.sub 'foo' :multi(Integer)
print "foo(Integer)\n"
.return (0)
.end

.sub 'foo' :multi(ResizablePMCArray, _)
print "foo(ResizablePMCArray,_)\n"
.return (0)
.end

$ ./parrot x.pir
foo(ResizablePMCArray,_)
foo(ResizablePMCArray,_)
$

When the .HLL directive is omitted or otherwise commented out,
I get the expected output:

$ ./parrot x.pir
foo(Integer)
foo(ResizablePMCArray,_)
$

I'll add the above test case to t/pmc/mmd.t after I get the
RT number from this post. :-)

Thanks,

Pm

0 new messages