[perl #46457] [BUG][IMCC] long sub invocation with named parameters
Will Coleda via RT
parrotbug-followup at parrotcode.org
Mon Sep 21 03:44:09 UTC 2009
On Tue Oct 16 03:28:12 2007, kjs wrote:
> It seems that the long version to invoke a subroutine, using .pcc_begin/end
> does not work using named parameters.
> See the example below
>
> .sub main
> .local pmc x
> x = find_global 'foo'
> .pcc_begin
> .arg 1 :named('x') # fails!
> .arg 2 :named('y') # fails!
> .pcc_call x
> .pcc_end
>
> foo('x' => 1, 'y' => 2)
> foo(1 :named('x'), 2 :named('y'))
> .end
>
> .sub foo
> .param int i :named('y')
> .param int j :named('x')
> print i
> print j
> .end
>
> The long version fails, saying: Named parameter with more than one name.
>
> It seems to me the long version is an exact rephrase of the short versions,
> both of which are shown below.
>
> This needs to be fixed.
Now being tracked in https://trac.parrot.org/parrot/ticket/1030; test with updated syntax
added in r41389.
--
Will "Coke" Coleda
More information about the parrot-dev
mailing list