use Super '.';
class A {
method a {
say 'A.a called';
}
}
class B is A {
method a {
super(self).a;
say 'B.a called';
}
}
B.a;
unit module Super;
class SuperDelegator {
has $!self is built;
method FALLBACK($name, |c) {
$!self.^mro[1].^method_table{$name}($!self, |c);
}
}
sub super($o) is export {
SuperDelegator.new(self => $o);
}