Default .new does wrong thing with arrays #104

Closed
colomon opened this Issue Jan 18, 2012 · 0 comments

2 participants

@colomon
Collaborator
[7:44am] colomon: perl6: class Foo { has @.bar; }; my $a = Foo.new(bar => [1, 2, 3]); say $a.bar.WHAT; say $a.bar[0].WHAT; say $a.bar.perl
[07:44am] p6eval: rakudo ed943e: OUTPUT«Array()␤Int()␤Array.new(1, 2, 3)␤»
[07:44am] p6eval: ..pugs b927740: OUTPUT«Array␤Int␤[1, 2, 3]␤»
[07:44am] p6eval: ..niecza v13-300-g280d918: OUTPUT«Array()␤Array()␤[[1, 2, 3]].list␤»
[07:45am] colomon: ... I think that's a niecza-bug
[07:46am] colomon: niecza: class Foo { has @.bar; }; my $a = Foo.new(bar => <1 2 3>); say $a.bar.WHAT; say $a.bar[0].WHAT; say $a.bar.perl
[07:46am] p6eval: niecza v13-300-g280d918: OUTPUT«Array()␤Str()␤["1", "2", "3"].list␤»
[07:47am] masak: colomon: looks like.
[07:47am] colomon: niecza: class Foo { has @.bar; }; my $a = Foo.new(bar => <1 2 3>.map(+*)); say $a.bar.WHAT; say $a.bar[0].WHAT; say $a.bar.perl
[07:47am] p6eval: niecza v13-300-g280d918: OUTPUT«Array()␤Int()␤[1, 2, 3].list␤»
[07:47am] colomon: niecza: say <1 2 3>.map(+*).WHAT
[07:47am] p6eval: niecza v13-300-g280d918: OUTPUT«List()␤»
@sorear sorear closed this in 99bda95 May 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment