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
problem mixing in role with multi builds #5642
Comments
From @MARTIMMHi, I get the following error using version 2016.08.1-66-g1ff1aae built on Cannot resolve caller BUILD(CC+{RR}: ); none of these signatures match: The code which generates the error (on the line with '$c does RR'); role RR { } class CC { multi submethod BUILD ( Str :$t! ) { } my CC $c .= new(:t<text1>); Removing the last line and add a trait 'does' to the class works but is Greetings, P.s. I've sent this mail before to rakudobug but I did not see it appear |
From @MARTIMMHi, Revisiting the problem using rakudo version 2016.10-31-g6ed3a68 built on The issue still exist but tried to rewrite things to get it working role RR1 { role RR2 { class CC { multi submethod BUILD ( Str :$t! ) { for <t i> { when 't' { This version works, but output is String text1 This means that the BUILD submethods in the roles are called without The roles, if needed, must be initialized with a later call, e.g. via Removing the submethods BUILD from the roles will trigger again the Cannot resolve caller BUILD(CC+{RR1}: ); none of these signatures match: Greetings |
Migrated from rt.perl.org#129212 (status was 'new')
Searchable as RT129212$
The text was updated successfully, but these errors were encountered: