role Entity {
method id {...}
}
role Entity[::Id] {
}
multi trait_mod:<is>(Attribute $id-attr where { .package ~~ Entity }, Bool :$entity-id where *.so) {
$id-attr.package.^add_role: Entity[$id-attr.type];
}
class Bla does Entity {
has Int $.id is entity-id
}
say Bla.^roles