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


$ cat /tmp/test
class M {
    has M @.ms is rw;
    method s($i=0) {
        $i ~ "[{ map { "{$_.s($i + 1)}" }, self.ms }]"
    }
}

my $m = M.new;
my $m2 = M.new;
$m2.ms = M.new;
$m.ms = M.new, $m2, M.new;
say $m.s;

$ perl6 /tmp/test
0[1[] 2[3[]] 4[]]

# expected output:
# 0[1[] 1[2[]] 1[]]

<masak> jnthn: did you fix my bug yet?
<jnthn> masak: no.
<jnthn> ENEEDMORECOFFEE
<jnthn> I looked at it, and then ran to the coffee machine. :-)
<masak> lol
* moritz_ also found it a bit hard to follow :-)
<masak> I think by golfing it I actually made it harder to follow. :/
<masak> when it was about indentation, it was immediate that it was wrong.
<moritz_> or if you gave them names (<a b c d e>) and print that along
with the number
<masak> the structure looks like this: Ma[Mb, Mc[Md], Me]
<masak> now, Mb and Me should be printed with the same indentation/number.
<jnthn> masak: ugh
<masak> but they aren't.
<jnthn> masak: Yes, I see the bug now.
* masak submits rakudobug
<jnthn> I agree it's wrong.

Reply via email to