# New Ticket Created by Juerd Waalboer
# Please include the string: [perl #127195]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=127195 >
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 <[email protected]>
TNX