You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Migrated from rt.perl.org#131945 (status was 'new')
Searchable as RT131945$
The text was updated successfully, but these errors were encountered: