Skip to content

Commit

Permalink
Add "is TypeObject" and "of TypeObject" traits
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jul 26, 2013
1 parent 7b901bd commit c73fd26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/Variable.pm
Expand Up @@ -17,6 +17,12 @@ multi trait_mod:<is>(Variable:D $v, :$readonly!) {
multi trait_mod:<is>(Variable:D $v, :$rw!) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_rw($rw);
}
multi trait_mod:<is>(Variable:D $v, Mu:U $of ) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_of($of);
}
multi trait_mod:<of>(Variable:D $v, Mu:U $of ) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_of($of);
}
multi trait_mod:<is>(Variable:D $v, :$dynamic!) {
# not sure what needs to happen here yet
}
Expand Down

0 comments on commit c73fd26

Please sign in to comment.