Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class has @.xx does extra wrapping #1719

Closed
p6rt opened this issue Apr 24, 2010 · 6 comments
Closed

class has @.xx does extra wrapping #1719

p6rt opened this issue Apr 24, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Apr 24, 2010

Migrated from rt.perl.org#74636 (status was 'resolved')

Searchable as RT74636$

@p6rt
Copy link
Author

p6rt commented Apr 24, 2010

From @finanalyst

code executed on #perl6 April24

I would expect both outputs to be the same. But the array is wrapped
again in an array.

finanalyst​: rakudo​: class A {has @​.s}; my %h='n'=><a1 a2 a3>; say
%h<n>.perl;my A $x.=new(​:s(%h<n>));say $x.s.perl
p6eval​: rakudo 543d67​: OUTPUT«("a1", "a2", "a3")␤[("a1", "a2", "a3")]␤»

@p6rt
Copy link
Author

p6rt commented Oct 10, 2011

From @coke

On Sat Apr 24 04​:56​:38 2010, richardh wrote​:

code executed on #perl6 April24

I would expect both outputs to be the same. But the array is wrapped
again in an array.

finanalyst​: rakudo​: class A {has @​.s}; my %h='n'=><a1 a2 a3>; say
%h<n>.perl;my A $x.=new(​:s(%h<n>));say $x.s.perl
p6eval​: rakudo 543d67​: OUTPUT«("a1", "a2", "a3")␤[("a1", "a2",
"a3")]␤»

No real change since then​:

17​:04 < [Coke]> rakudo​: class A {has @​.s}; my %h='n'=><a1 a2 a3>; say
  %h<n>.perl;my A $x.=new(​:s(%h<n>));say $x.s.perl
17​:04 <+p6eval> rakudo 38907e​: OUTPUT«("a1", "a2",
"a3")␤Array.new("a1", "a2",
  "a3")␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 10, 2011

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Mon Oct 10 14​:05​:00 2011, coke wrote​:

On Sat Apr 24 04​:56​:38 2010, richardh wrote​:

code executed on #perl6 April24

I would expect both outputs to be the same. But the array is wrapped
again in an array.

finanalyst​: rakudo​: class A {has @​.s}; my %h='n'=><a1 a2 a3>; say
%h<n>.perl;my A $x.=new(​:s(%h<n>));say $x.s.perl
p6eval​: rakudo 543d67​: OUTPUT«("a1", "a2", "a3")␤[("a1", "a2",
"a3")]␤»

No real change since then​:

17​:04 < [Coke]> rakudo​: class A {has @​.s}; my %h='n'=><a1 a2 a3>; say
%h<n>.perl;my A $x.=new(​:s(%h<n>));say $x.s.perl
17​:04 <+p6eval> rakudo 38907e​: OUTPUT«("a1", "a2",
"a3")␤Array.new("a1", "a2",
"a3")␤»

jnthn says the current output is correct. marking testneeded.

13​:37 < diakopter> p6​: class A {has @​.s}; my %h='n'=><a1 a2 a3>; say
%h<n>.perl;my A
  $x.=new(​:s(%h<n>));say $x.s.perl
13​:37 <+p6eval> rakudo e2d876​: OUTPUT«$("a1", "a2",
"a3")␤Array.new("a1", "a2", "a3")␤»
13​:37 <+p6eval> ..pugs​: OUTPUT«\"a1"␤\("a1",)␤»
13​:37 <+p6eval> ..niecza v18​: OUTPUT«$("a1", "a2", "a3")␤["a1", "a2",
"a3"].list␤»
13​:37 -!- brrt [~bart@​s514486c6.adsl.wanadoo.nl] has quit [Ping timeout​:
252 seconds]
13​:37 < diakopter> jnthn/sorear​: ^^ which is right
13​:38 < diakopter> RT #​74636 wants both .perl to output the same
13​:40 < jnthn> diakopter​: I think Rakudo and Niecza's outputs are saying
the same thing
  really.
13​:40 < jnthn> diakopter​: Or close enough.

13​:41 < diakopter> jnthn​: so are they both right for both .perl (can I
mark the ticket
  testneeded)?
13​:41 < jnthn> diakopter​: It's doing what I expect it to do there, yes.
13​:41 < jnthn> diakopter​: That is, it's item-y when it's in a hash
value.

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

From @moritz

Now tested in S12-attributes/instance.t

@p6rt
Copy link
Author

p6rt commented Aug 7, 2012

@moritz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant