Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix diamond role composition.
  • Loading branch information
jnthn committed Sep 21, 2011
1 parent 3b1fe55 commit a26660d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Perl6/Metamodel/BOOTSTRAP.pm
Expand Up @@ -430,6 +430,10 @@ Code.HOW.add_method(Code, 'dispatcher', sub ($self) {
pir::getattribute__PPPs(pir::perl6_decontainerize__PP($self),
Code, '$!dispatcher')
});
Code.HOW.add_method(Code, 'id', sub ($self) {
pir::getattribute__PPPs(pir::perl6_decontainerize__PP($self),
Code, '$!do').start_offs()
});
pir::perl6_set_type_code__vP(Code);

# Need to actually run the code block. Also need this available before we finish
Expand Down
3 changes: 3 additions & 0 deletions src/Perl6/Metamodel/RoleToRoleApplier.pm
Expand Up @@ -32,6 +32,9 @@ my class RoleToRoleApplier {
if $meth =:= $_ {
$found := 1;
}
elsif pir::can($meth, 'id') && pir::can($_, 'id') {
$found := $meth.id == $_.id;
}
}
unless $found {
@meth_list.push($meth);
Expand Down

0 comments on commit a26660d

Please sign in to comment.