Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tentative 'of' trait, for use with subset.
  • Loading branch information
jnthn committed Jun 14, 2011
1 parent cb6bc83 commit 7fde1b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/traits.pm
Expand Up @@ -23,6 +23,12 @@ multi trait_mod:<does>(Mu:U $doee, Mu:U $role) {
$doee.HOW.add_role($doee, $role)
}

proto trait_mod:<of>(|$) { * }
multi trait_mod:<of>(Mu:U $target, Mu:U $type) {
# XXX Ensure we can do this, die if not.
$target.HOW.set_of($target, $type);
}

proto trait_mod:<as>(|$) { * }
multi trait_mod:<as>(Parameter:D $param, $type) {
# XXX TODO
Expand Down

0 comments on commit 7fde1b2

Please sign in to comment.