Skip to content

Commit

Permalink
Fix is_array_type on roles
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Jan 9, 2022
1 parent 5bc2ad2 commit 5c150ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Perl6/Metamodel/RoleToRoleApplier.nqp
Expand Up @@ -261,6 +261,14 @@ my class RoleToRoleApplier {
$target.HOW.add_parent($target, $p, :hides($how.hides_parent($r, $p)));
}
}

if nqp::can($target.HOW, 'is_array_type') && !$target.HOW.is_array_type($target) {
if nqp::can($how, 'is_array_type') {
if $how.is_array_type($r) {
$target.HOW.set_array_type($target, $how.array_type($r));
}
}
}
}

1;
Expand Down

0 comments on commit 5c150ca

Please sign in to comment.