Permalink
Browse files

Get hides working again.

  • Loading branch information...
1 parent f509251 commit e5540ec3fa2e52c647e3ea4f129a494d395899c8 @jnthn jnthn committed Jul 2, 2010
Showing with 9 additions and 4 deletions.
  1. +8 −3 src/core/traits.pm
  2. +1 −1 src/metamodel/ClassHOW.pir
View
@@ -12,18 +12,23 @@ our multi trait_mod:<is>(Mu $child, Role $r) {
$child.^add_parent($r!select!pun);
}
-multi trait_mod:<is>(Mu $type where { !.defined }, :$rw!) {
+our multi trait_mod:<is>(Mu $type where { !.defined }, :$rw!) {
$type.HOW does role { method rw { True } }
}
-multi trait_mod:<is>(Mu $type where { !.defined }, :$hidden!) {
+our multi trait_mod:<is>(Mu $type where { !.defined }, :$hidden!) {
$type.HOW does role { method hidden { True } }
}
-multi trait_mod:<is>(Routine $r, :$default!) {
+our multi trait_mod:<is>(Routine $r, :$default!) {
$r does role { method default { True } }
}
+our multi trait_mod:<hides>(Mu $child, Mu $parent) {
+ trait_mod:<is>($child, $parent);
+ $child.^hides.push($parent);
+}
+
role Positional { ... }
role Associative { ... }
our multi trait_mod:<of>(ContainerDeclarand $cont, Mu \$type) {
@@ -779,7 +779,7 @@ Accessor for hides property.
=cut
.sub 'hides' :method
- .local pmc obj
+ .param pmc obj
$P0 = getattribute self, '$!hides'
unless null $P0 goto done
$P0 = new 'Array'

0 comments on commit e5540ec

Please sign in to comment.