-
Notifications
You must be signed in to change notification settings - Fork 1
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 find &say inside method that came from a role in Rakudo #1666
Comments
From @masak<colomon> rakudo: role Animal { method speak() { say "Blah"; } }; role |
From @masak<takadonet> rakudo: role work { method x {say 'hello'}}; class me does work {}; me.new.x(); |
From [Unknown Contact. See original ticket]<takadonet> rakudo: role work { method x {say 'hello'}}; class me does work {}; me.new.x(); |
@masak - Status changed from 'new' to 'open' |
From albastev@yahoo.comHello, I hope you have had a good weekend. I had just downloaded the April development release, and was experimenting with Perl 6 classes when I found that I could not use the 'say' subroutine from within a method declared in a role. I found this as bug #74078. I then tried several other built in functions, and they suffered similar fates. I did not immediately find any tickets that matched the others, though I could have missed. I have included some example code below. Hopefully this is helpful. Even if it is not, I would like to thank you for your efforts. Have a good week. Steven Albano our &s = &say; role Howdy { class Greet does Howdy { $nod.sayHowdy();
|
From @supernovusIf you have a class that uses a role that defines an attribute, and you try role F { has Int $.boo = 1 } use MONKEY_TYPING; # Attribute '$!boo' already exists in the class, but a role also wishes to my $b = B.new; $b.hi; # Could not find sub &say Very strange behavior indeed. I found it while extracting DateTime::strftime |
From @bbkrWORKS: FAILS: |
From @moritzworks now in rakudo, and tested in t/spec/S14-roles/composition.t. |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#74078 (status was 'resolved')
Searchable as RT74078$
The text was updated successfully, but these errors were encountered: