Skip to content

Commit

Permalink
Added additional dereference, as suggested by jnthn++
Browse files Browse the repository at this point in the history
It doesn't break anything new, and makes some other errors messags more sane.
  • Loading branch information
lizmat committed Jul 26, 2013
1 parent 68ece49 commit 5204a3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/Variable.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ my class Variable {
# container traits
multi trait_mod:<is>(Variable:D $v, :$default!) {
$v.var = $default; # make sure we start with the default
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_default($default);
nqp::getattr($v.var, $v.var.VAR.WHAT, '$!descriptor').set_default($default);
}
multi trait_mod:<is>(Variable:D $v, :$readonly!) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_rw(!$readonly);
nqp::getattr($v.var, $v.var.VAR.WHAT, '$!descriptor').set_rw(!$readonly);
}
multi trait_mod:<is>(Variable:D $v, :$rw!) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_rw($rw);
nqp::getattr($v.var, $v.var.VAR.WHAT, '$!descriptor').set_rw($rw);
}
multi trait_mod:<of>(Variable:D $v, Mu:U $of ) {
nqp::getattr($v.var, $v.VAR.WHAT, '$!descriptor').set_of(nqp::decont($of));
nqp::getattr($v.var, $v.var.VAR.WHAT, '$!descriptor').set_of(nqp::decont($of));
}

multi trait_mod:<is>(Variable:D $v, Mu:U $is ) {
Expand Down

0 comments on commit 5204a3f

Please sign in to comment.