Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change return values from add_parent and add_role to be something oth…
…er than a type object, so they'll at least be considered something true. Also avoids us sinking types we've not finished compiling yet.
  • Loading branch information
jnthn committed Feb 18, 2012
1 parent 0e2a54e commit ecf6bcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Perl6/Metamodel/MultipleInheritance.pm
Expand Up @@ -24,6 +24,7 @@ role Perl6::Metamodel::MultipleInheritance {
}
}
@!parents[+@!parents] := $parent;
nqp::elems(@!parents)
}

# Introspects the parents.
Expand Down
3 changes: 2 additions & 1 deletion src/Perl6/Metamodel/RoleContainer.pm
Expand Up @@ -2,7 +2,8 @@ role Perl6::Metamodel::RoleContainer {
has @!roles_to_compose;

method add_role($obj, $role) {
@!roles_to_compose[+@!roles_to_compose] := $role
@!roles_to_compose[+@!roles_to_compose] := $role;
nqp::elems(@!roles_to_compose);
}

method roles_to_compose($obj) {
Expand Down

0 comments on commit ecf6bcc

Please sign in to comment.