Navigation Menu

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

can't push to an attribute array typed with the class it's in in Rakudo #1119

Closed
p6rt opened this issue Jul 5, 2009 · 5 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 5, 2009

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

Searchable as RT67236$

@p6rt
Copy link
Author

p6rt commented Jul 5, 2009

From @masak

<masak> next one :)
<jnthn> rakudo​: my $a = undef; say $a.PARROT; say undef.PARROT;
<p6eval> rakudo 6a4d66​: OUTPUT«Failure␤Failure␤»
<masak> rakudo​: class A { has A @​.as is rw }; my $x = A.new; $x.as[0]
= A.new; say $x.as.perl
<p6eval> rakudo 6a4d66​: OUTPUT«[A.new()]␤»
<masak> this works fine.
<masak> rakudo​: class A { has A @​.as is rw }; my $x = A.new;
$x.as.push​: A.new; say $x.as.perl
<masak> this doesn't.
<p6eval> rakudo 6a4d66​: OUTPUT«Type check failure in push [...]
<masak> bug, right?
<jnthn> rakudo​: class A { has A @​.as is rw }; my $x = A.new;
$x.as.push(A.new); say $x.as.perl
<p6eval> rakudo 6a4d66​: OUTPUT«Type check failure in push [...]
<jnthn> rakudo​: class A { has A @​.as is rw }; my $x = A.new; say $x.as.of
<p6eval> rakudo 6a4d66​: OUTPUT«Module()␤»
<jnthn> oh wtf
* masak submits that one too
<masak> rakudo​: class A {}; class B { has A @​.as }; B.new.as.push(A.new)
<p6eval> rakudo 6a4d66​: ( no output )
<masak> essential part of that last bug there.
<jnthn> Yes, I know.
<masak> it needs to be the same class.
<jnthn> It's when the type is the same as...right.
<jnthn> Because it looks up the type before the proto-object is installed.
<masak> ah! yes, I just realized that.
<masak> pipes sticking out.
<jnthn> Aye, an unfortunate consequence of the way thigns are
currently implemented.
<jnthn> I don't have a fast solution for that.

@p6rt
Copy link
Author

p6rt commented Jul 5, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/t/spec/S12-attributes/recursive.t

@p6rt
Copy link
Author

p6rt commented Jul 5, 2009

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

@p6rt
Copy link
Author

p6rt commented Aug 21, 2009

From @jnthn

On Sun Jul 05 04​:25​:00 2009, masak wrote​:

<masak> next one :)
<jnthn> rakudo​: my $a = undef; say $a.PARROT; say undef.PARROT;
<p6eval> rakudo 6a4d66​: OUTPUT«Failure␤Failure␤»
<masak> rakudo​: class A { has A @​.as is rw }; my $x = A.new; $x.as[0]
= A.new; say $x.as.perl
<p6eval> rakudo 6a4d66​: OUTPUT«[A.new()]␤»
<masak> this works fine.
<masak> rakudo​: class A { has A @​.as is rw }; my $x = A.new;
$x.as.push​: A.new; say $x.as.perl
<masak> this doesn't.
<p6eval> rakudo 6a4d66​: OUTPUT«Type check failure in push [...]
<masak> bug, right?

Bug fixed as a side-effect of various refactors committed in git
527cb8f, plus tests unfudged.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Aug 21, 2009

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

@p6rt p6rt closed this as completed Aug 21, 2009
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant