Skip Menu |
Report information
Id: 74664
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: sorear <stefanor [at] cox.net>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



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.
Download (untitled) / with headers
text/plain 161b
19:36 <@moritz_> rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar" 19:36 <+p6eval> rakudo 928f9d: OUTPUT«a Any()␤» Much better now, though not perfect.
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 399b
On Sat Jul 24 10:38:58 2010, moritz wrote: Show quoted text
> 19:36 <@moritz_> rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar" > 19:36 <+p6eval> rakudo 928f9d: OUTPUT«a Any()␤» > > Much better now, though not perfect.
Slight change: 09:20 < [Coke]> rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar" #RT #74664 09:20 <+p6eval> rakudo ce5cca: OUTPUT«a ␤» -- Will "Coke" Coleda
Download (untitled) / with headers
text/plain 790b
On Wed Feb 01 06:21:05 2012, coke wrote: Show quoted text
> On Sat Jul 24 10:38:58 2010, moritz wrote:
> > 19:36 <@moritz_> rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar" > > 19:36 <+p6eval> rakudo 928f9d: OUTPUT«a Any()␤» > > > > Much better now, though not perfect.
> > Slight change: > > 09:20 < [Coke]> rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar" #RT > #74664 > 09:20 <+p6eval> rakudo ce5cca: OUTPUT«a ␤» >
perl6 -e 'my ($foo, $bar = "baz") = <a>; say "$foo $bar"' Use of uninitialized value $bar of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at -e line 1 a perl6 --version This is Rakudo version 2016.09 built on MoarVM version 2016.09 implementing Perl 6.c.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org