# New Ticket Created by Zoffix Znet
# Please include the string: [perl #131945]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=131945 >
I'd expect all three have the same behaviour (likely the last one, that cries
about already-bound symbols):
my int $x = 42;
{ say $x; my int $x = 70; }
# OUTPUT: 0 (no errors)
my int $y = 42;
{ say $y; my $y = 70; }
# OUTPUT:
# ===SORRY!===
# Cannot take a reference to a non-native lexical
my $z = 42;
{ say $z; my $z = 70; }
# ===SORRY!=== Error while compiling
/home/zoffix/devbox/tmp/C/exercises/f.p6
# Lexical symbol '$z' is already bound to an outer symbol;
# the implicit outer binding must be rewritten as OUTER::<$z>
# before you can unambiguously declare a new '$z' in this scope
# at /home/zoffix/devbox/tmp/C/exercises/f.p6:12
# ------> { say $z; my $z⏏ = 70; }
# expecting any of:
# constraint