# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #69312]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=69312 >
<masak> rakudo: sub foo { say "=" x 40 }; for reverse ^40 -> $n {
&foo.wrap({ say "=" x $n; callsame; say "=" x $n }); }; foo
<p6eval> rakudo 0eaf62:
OUTPUT«========================================»
<masak> in the above code, why doesn't $n bind like I think it should?
<masak> I had hoped it would produce a nice triangle of ='s.
<pmurias> rakudo: sub foo { say 40 }; for reverse ^40 -> $n { say
$n;&foo.wrap({ say
$n; callsame; say $n }); }; foo
<p6eval> rakudo 0eaf62:
OUTPUT«39383736353433323130292827262524232221201918171615141312111098765432100000000000000000000000000000000000000000400000000000000
<pmurias> masak: looks like some sort of a scoping bug
* masak submits rakudobug
I'm not certain this is a bug. But if Perl 6 doesn't conform to my
expectations in the above case, it'll be interesting to learn why not.