#1030: long sub invocation with named parameters
--------------------+-------------------------------------------------------
Reporter: coke | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version: trunk
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
--------------------+-------------------------------------------------------
See [http://rt.perl.org/rt3/Ticket/Display.html?id=46457 Original RT]
:named syntax in verbose subroutine calls does not work in PIR. e.g.:
{{{
.sub main
.local pmc foo
foo = get_global 'foo'
foo('x' => 1, 'y' => 2)
foo(1 :named('x'), 2 :named('y'))
.begin_call
.set_arg 1 :named('x')
.set_arg 2 :named('y')
.call foo
.end_call
.end
.sub foo
.param int i :named('y')
.param int j :named('x')
say i
say j
.end
}}}
Generates the error:
{{{
error:imcc:Named parameter with more than one name.
in file 'foo.pir' line 10
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1030>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets