diff --git a/src/core/traits.pm b/src/core/traits.pm index 8335d337771..d70307396dd 100644 --- a/src/core/traits.pm +++ b/src/core/traits.pm @@ -12,6 +12,10 @@ our multi trait_mod:(Mu $child, Role $r) { $child.^add_parent($r!select!pun); } +multi trait_mod:(Mu $type where { !.defined }, :$rw!) { + $type.HOW does role { method rw { True } } +} + role Positional { ... } role Associative { ... } our multi trait_mod:(ContainerDeclarand $cont, Mu \$type) {