On Fri Jun 19 12:57:49 2015, [email protected] wrote:
> I tried the evaluation from this bug report and didn't get that
> internal error anymore. There is still a type check error, though
> (which looks plausible to me):
> 
> $ perl6-m -e 'sub p(*@l) { gather { if @l == 1 { take @l } else {
> @l.shift; for p(@l) -> @p {} } } }; say p 1..4'
> Type check failed in binding @p; expected 'Positional' but got 'Int'
>   in block  at -e:1
> 
> If I change @p to a scalar container $p, the code does not die:
> 
> $ perl6-m -e 'sub p(*@l) { gather { if @l == 1 { take @l } else {
> @l.shift; for p(@l) -> $p {} } } }; say p 1..4; say "alive"'
> 
> alive
> 
> I'm not quite sure how a proper test for this ticket would look like.
> Just testing for X::TypeCheck?

Behavior changes in GLR:
09:05 < [Coke]> m: sub p(*@l) { gather { if @l == 1 { take @l } else { 
@l.shift; for p(@l) -> @p {} } } }; say p 1..4
09:05 < GLRelia> rakudo-moar 966096: OUTPUT«␤»
09:05 <+camelia> rakudo-moar fd1612: OUTPUT«Type check failed in binding @p; 
expected 'Positional' but got 'Int'␤  in block  at
                 /tmp/SqXtcgfOAz:1␤  in block <unit> at /tmp/SqXtcgfOAz:1␤␤»

-- 
Will "Coke" Coleda

Reply via email to