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
Something is wrong with instantiation of generic roles and typed attributes in Rakudo #2641
Comments
From @masak<masak> nom: role Foo[::T] { has T @.a = [T] }; class Bar {}; say |
From @usev6As a status update: This behaves differently now. $ perl6-m -e 'role Foo[::T] { has T @.a = [T] }; class Bar {}; say Foo[Bar].new.a[0]' $ perl6-m -e 'my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r).perl.say' $ perl6-m -e 'my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r, :local).[0].type.HOW.archetypes.generic.say' |
1 similar comment
From @usev6As a status update: This behaves differently now. $ perl6-m -e 'role Foo[::T] { has T @.a = [T] }; class Bar {}; say Foo[Bar].new.a[0]' $ perl6-m -e 'my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r).perl.say' $ perl6-m -e 'my $r = role Foo[::T] { has T @.a }; $r.HOW.attributes($r, :local).[0].type.HOW.archetypes.generic.say' |
@usev6 - Status changed from 'new' to 'open' |
From @jdv[jdv@wieldy ~]$ perl6 -e 'role Foo[::T] { has T @.a = T }; class Bar {}; say Foo[Bar].new.a[0]'(Bar) looks like more valid code than [jdv@wieldy ~]$ perl6 -e 'role Foo[::T] { has T @.a = [T] }; class Bar {}; say Foo[Bar].new.a[0]' [jdv@wieldy ~]$ |
From @jdvAdded tests in S14-roles/parameterized-basic.t. |
@jdv - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#109880 (status was 'resolved')
Searchable as RT109880$
The text was updated successfully, but these errors were encountered: