# New Ticket Created by  Radu Stoica 
# Please include the string:  [perl #76142]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76142 >


The following code outputs <Any()> instead of giving <symbol not predeclared> 
error:

say $a;
my $a = 5;


<radu_> rakudo: sub foo() {say $test; }; my $test = foo();
<p6eval> rakudo 233401: OUTPUT«Any()␤»
<radu_> hm. I was expecting an undeclared variable error. Does anyone know if 
this is how it should work?
<allbery_b> I think it's like perl5: the former is in the global setting, the 
latter in the lexical.  It *should* warn, though.
<pmichaud> that should've been an error, yes.
<pmichaud> rakudo:  say $a;  my $a = 5;
<p6eval> rakudo 233401: OUTPUT«Any()␤»
<pmichaud> that's.... weird.


      

Reply via email to