Skip Menu |
Report information
Id: 127195
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: juerd [at] tnx.nl
Cc:
AdminCc:

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



Subject: Shaped array in signatures doesn't declare the lexical variable
To: rakudobug [...] perl.org
From: "Juerd Waalboer" <juerd [...] tnx.nl>
Date: Thu, 7 Jan 2016 03:28:28 +0100
Download (untitled) / with headers
text/plain 532b
Works: sub foo (@bar[4]) { say "can haz bar" }; my @x[4]; foo(@x); # outputs "can haz bar" my @y[5]; foo(@y); # "Constraint type check failed ..." Doesn't compile: sub foo (@bar[4]) { say "can haz bar: @bar[]" }; # "Variable '@bar' is not declared" Does the wrong thing: my @bar = <outer scope>; sub foo (@bar[4]) { say "can haz bar: @bar[]" }; my @x[4]; foo(@x); # outputs "outer scope" -- Met vriendelijke groet, // Kind regards, // Korajn salutojn, Juerd Waalboer <juerd@tnx.nl> TNX


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