Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid tripping up over containers.
  • Loading branch information
jnthn committed May 23, 2011
1 parent 7ab3578 commit 45cfbca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Perl6/Metamodel/MultipleInheritance.pm
Expand Up @@ -4,6 +4,9 @@ role Perl6::Metamodel::MultipleInheritance {

# Adds a parent.
method add_parent($obj, $parent) {
$obj := pir::descalarref__PP($obj);
$parent := pir::descalarref__PP($parent);

if self.is_composed($obj) {
pir::die("Parents cannot be added to a class after it has been composed");
}
Expand Down

0 comments on commit 45cfbca

Please sign in to comment.