# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #111284]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=111284 >


<pmurias> moritz: our both declares a package variable and creates an
lexical alias to it
<moritz> right
<masak> nom: { our $a = 42 }; say $a
<p6eval> nom 4130f6: OUTPUT«===SORRY!===␤Variable $a is not
declared␤at /tmp/_0FYRayuIK:1␤»
<masak> perhaps the easiest way to demonstrate that.
<moritz> under 'no strict', that would print 42
<masak> nom: { our $a = 42 }; say our $a
<p6eval> nom 4130f6: OUTPUT«Any()␤»
<masak> huh!
<pmurias> nom: {our $a = 42};our $a; say $a;
<p6eval> nom 4130f6: OUTPUT«Any()␤»
<masak> I call bug.
<pmurias> me too
* masak submits rakudobug
<masak> b: { our $a = 42 }; say our $a
<p6eval> b 1b7dd1: OUTPUT«42␤»
<masak> niecza: { our $a = 42 }; say our $a
<p6eval> niecza v14-57-gd05a5fe: OUTPUT«42␤»
<moritz> I could have sworn that one worked in nom

Rakudo prints 'Any()' -- I expect it to print '42' there, just like b
and niecza.

Reply via email to