# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #67848] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=67848 >
<ihrd> rakudo: my $code = {"Foo"}; my %h = :bar; $code(| %h); <p6eval> rakudo e989e6: OUTPUT«FixedIntegerArray: index out of bounds! [...] <jnthn> ooh <jnthn> good find <jnthn> rakudo: my $code = {"Foo"}; my %h = :bar; <p6eval> rakudo e989e6: ( no output ) <ihrd> and another one <ihrd> rakudo: my $code = {"Foo"}; $code(| {:foo}); <p6eval> rakudo e989e6: OUTPUT«argument doesn't array [...] <frettled> doesn't array? <ihrd> lat just about wrong | relization <jnthn> rakudo: my $code = {"Foo"; $:bar}; my %h = :bar; $code(| %h); <p6eval> rakudo e989e6: ( no output ) <pmichaud> ah. currently the prefix-| only can work on array and hash variables <jnthn> Somehow, the parameter passing gets very upset if you pass a flattening hash and have nowhere to stick the named params. <ihrd> pimchaud: mb better error message here, something like "NIY" <jnthn> rakudo: sub foo() { }; foo(:bar) <p6eval> rakudo e989e6: ( no output ) <jnthn> rakudo: sub foo() { }; my %h = :bar; foo(|%h) <p6eval> rakudo e989e6: ( no output ) <jnthn> oh huh <jnthn> rakudo: sub foo() { }; my %h = :bar; foo(|%h) <p6eval> rakudo e989e6: ( no output ) <pmichaud> jnthn: you need a param to foo <moritz_> rakudo: multi sub foo() { }; my %h = :bar; foo(|%h) <p6eval> rakudo e989e6: ( no output ) <jnthn> rakudo: sub foo($fake) { }; my %h = :bar; foo(|%h) <p6eval> rakudo e989e6: OUTPUT«too many named arguments - 'bar' not expected [...] <pmichaud> rakudo: sub foo($a) { }; my %h = :bar; foo(1, |%h); <p6eval> rakudo e989e6: ( no output ) <jnthn> Nope, that didn't quite get it either. * jnthn is confused <pmichaud> rakudo: my $code = -> $a { "Foo" }; my %h = :bar; $code(|%h); [13:05] <p6eval> rakudo e989e6: OUTPUT«too many named arguments - 'bar' not expected [...] <pmichaud> oh! <pmichaud> oh! <pmichaud> no. <jnthn> well that was anti-climactic. <pmichaud> rakudo: my $code = { "Foo" }; $code(); <p6eval> rakudo e989e6: ( no output ) <pmichaud> rakudo: my $code = { "Foo" }; $code(1); <p6eval> rakudo e989e6: ( no output ) <jnthn> rakudo: my $code = { "Foo" }; $code(:bar); <p6eval> rakudo e989e6: OUTPUT«FixedIntegerArray: index out of bounds! [...] <pmichaud> rakudo: my $code = -> $a? { "Foo" }; my %h = :bar; $code(|%h); <p6eval> rakudo e989e6: OUTPUT«FixedIntegerArray: index out of bounds! [...] <pmichaud> *there* <pmichaud> it's when there's an optional param <jnthn> optional param + named flat with nothing to receive it. * masak submits that as a rakudobug <jnthn> Guess that's another PCC bug. <pmichaud> yes. <moritz_> and another less-than-awesome error message :/ <jnthn> *another* :'( <pmichaud> I suspect that combination isn't handled in the pcc code