Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure that we compose a ParametricRoleHOW before adding it to the gr…
…oup, so the group gets the fully composed view of it.
  • Loading branch information
jnthn committed Sep 21, 2011
1 parent a26660d commit b0b9b78
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Perl6/Actions.pm
Expand Up @@ -1127,15 +1127,20 @@ class Perl6::Actions is HLL::Actions {
my $code := $*ST.create_code_object($block, 'Block', $sig);
$*ST.pkg_set_role_body_block($*PACKAGE, $code, $block);

# Compose before we add the role to the group, so the group sees
# it composed.
$*ST.pkg_compose($*PACKAGE);

# Add this role to the group if needed.
my $group := $*PACKAGE.HOW.group($*PACKAGE);
unless $group =:= $*PACKAGE {
$*ST.pkg_add_role_group_possibility($group, $*PACKAGE);
}
}

# Compose.
$*ST.pkg_compose($*PACKAGE);
else {
# Compose.
$*ST.pkg_compose($*PACKAGE);
}

# Document
Perl6::Pod::document($*PACKAGE, $*DOC);
Expand Down

0 comments on commit b0b9b78

Please sign in to comment.