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


<masak> when I write 'our sub foo', the scope of the parameters in the
signature of foo is a global scope rather than a lexical scope, yes?
<TimToady> uh, no
<TimToady> only 'foo' is aliased
<masak> so, how about this?
<masak> rakudo: my $a = 1; sub foo() { my $a = 2; our sub bar($x where
$a) { say $x } }; bar(1); bar(2)
<p6eval> rakudo 974d9a: OUTPUT«1␤Constraint type check failed for
parameter '$x' [...]
<TimToady> looks like it's getting the wrong $a to me
* masak submits rakudobug
<TimToady> ($a isn't a parameter though)
<pmichaud> sub foo() { my $a = 2; our sub bar($x where $a) { say $x } }; bar(2);
<pmichaud> rakudo: sub foo() { my $a = 2; our sub bar($x where $a) {
say $x } }; bar(2);
<p6eval> rakudo 974d9a: OUTPUT«Symbol '$a' not predeclared in bar [...]
<pmichaud> looks like the where clause is attached to the wrong outer scope
<TimToady> it does at that

Reply via email to