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

You can push strings to attribute arrays typed with Int in Rakudo #879

Closed
p6rt opened this issue Apr 9, 2009 · 5 comments
Closed

You can push strings to attribute arrays typed with Int in Rakudo #879

p6rt opened this issue Apr 9, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 9, 2009

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

Searchable as RT64594$

@p6rt
Copy link
Author

p6rt commented Apr 9, 2009

From @masak

<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
(2, 3, 4); say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«[2, 3, 4]␤»
<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
(2, 3, 4); $x.a.push​: 'foo'; say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«[2, 3, 4, "foo"]␤»
<moritz_> masak​: care to submit? :-)
* masak submits
<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
<foo bar>; say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«["foo", "bar"]␤»

@p6rt
Copy link
Author

p6rt commented Apr 23, 2009

From @moritz

On Thu Apr 09 01​:12​:40 2009, masak wrote​:

<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
(2, 3, 4); say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«[2, 3, 4]␤»
<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
(2, 3, 4); $x.a.push​: 'foo'; say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«[2, 3, 4, "foo"]␤»
<moritz_> masak​: care to submit? :-)
* masak submits
<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
<foo bar>; say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«["foo", "bar"]␤»

Tests can be found in t/spec/S12-attributes/instance.t.

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Apr 23, 2009

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

@p6rt
Copy link
Author

p6rt commented May 20, 2009

From @jnthn

On Thu Apr 23 09​:44​:12 2009, moritz wrote​:

On Thu Apr 09 01​:12​:40 2009, masak wrote​:

<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
(2, 3, 4); say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«[2, 3, 4]␤»
<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
(2, 3, 4); $x.a.push​: 'foo'; say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«[2, 3, 4, "foo"]␤»
<moritz_> masak​: care to submit? :-)
* masak submits
<moritz_> rakudo​: class A { has Int @​.a is rw }; my $x=A.new; $x.a =
<foo bar>; say $x.a.perl
<p6eval> rakudo e05aff​: OUTPUT«["foo", "bar"]␤»

Tests can be found in t/spec/S12-attributes/instance.t.

Fixed in git 6685755, and unfudged the tests (all but one pass, due to
what I believe to be an unrelated auto-vivification bug; todo'd that one).

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented May 20, 2009

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

@p6rt p6rt closed this as completed May 20, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant