You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rakudo 087e299898416ca6c3a6e2b2bdc3785d841f0ec6:
./perl6 -e 'class P { submethod BUILD($o) { say self.WHAT; $o.shout } };
class C is P { method shout { say "alive" } }; C.new()'
P
alive
C
alive
The submethod BUILD is called twice here, once for the parent and once
for the
child class. If the child class defines such a submethod itself, each is
only
called once and all is fine:
$./perl6 -e 'class P { submethod BUILD($o) { say self.WHAT; $o.shout }
}; class C is P { submethod BUILD($o) { say "in child" }; method shout {
say "alive" } }; C.new()'
P
alive
in child
Migrated from rt.perl.org#63900 (status was 'resolved')
Searchable as RT63900$
The text was updated successfully, but these errors were encountered: