|Subject:||[BUG] LTA error message for attempting to use a signature in a list assignment|
|Date:||Sun, 25 Apr 2010 15:37:37 -0700|
|To:||rakudobug [...] perl.org|
|From:||Stefan O'Rear <stefanor [...] cox.net>|
15:14 < sorear> rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar" 15:14 <+p6eval> rakudo e393c7: OUTPUT«Undefined value shifted from empty array␤current instr.: 'perl6;Perl6Exception;throw' pc 14877 (src/builtins/Seq.pir:28)␤» 15:20 <@jnthn> I think we probably should just complain at parse time actually. 15:20 <@jnthn> We parse a signature there, but if you're starting to stick in optional parameters and stuff, we just say "oh noes, that's too complex to turn into a list". 15:20 <@jnthn> If you want full signature semantics, use binding, not assignment. 15:21 <@jnthn> Us not complaining about the signature being too complex is a rakudo fail. 15:21 <@jnthn> It's a bit annoying implementation wise. 15:21 <@jnthn> Because you parse a signature always but in the = case you want to do list assignment. 15:22 <@jnthn> So you need to turn the signature into a list. 15:22 <@jnthn> Which doesn't make sense if it's anything complex.