Skip to content

Commit

Permalink
Make sure we don't lose imformation about how we arrived at a given c…
Browse files Browse the repository at this point in the history
…oncrete role; we need it in the type check list.
  • Loading branch information
jnthn committed Sep 9, 2011
1 parent 36d06e1 commit 3e24ff0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Perl6/Metamodel/ClassHOW.pm
Expand Up @@ -58,6 +58,7 @@ class Perl6::Metamodel::ClassHOW
while @roles_to_compose {
my $r := @roles_to_compose.pop();
@!roles[+@!roles] := $r;
@!role_typecheck_list[+@!role_typecheck_list] := $r;
@ins_roles.push($r.HOW.specialize($r, $obj))
}
RoleToClassApplier.apply($obj, @ins_roles);
Expand Down
6 changes: 6 additions & 0 deletions src/Perl6/Metamodel/ConcreteRoleHOW.pm
Expand Up @@ -43,6 +43,12 @@ class Perl6::Metamodel::ConcreteRoleHOW

method compose($obj) {
RoleToRoleApplier.apply($obj, self.roles_to_compose($obj));
for self.roles_to_compose($obj) {
@!role_typecheck_list[+@!role_typecheck_list] := $_;
for $_.HOW.role_typecheck_list($_) {
@!role_typecheck_list[+@!role_typecheck_list] := $_;
}
}
for @!roles {
@!role_typecheck_list[+@!role_typecheck_list] := $_;
for $_.HOW.role_typecheck_list($_) {
Expand Down

0 comments on commit 3e24ff0

Please sign in to comment.