Skip to content

Commit

Permalink
Merge pull request #3371 from vrurg/submethod-resolution-fix
Browse files Browse the repository at this point in the history
Submethod resolution fix
  • Loading branch information
vrurg committed Dec 21, 2019
2 parents db65798 + 0d2eb1c commit dd36a35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Perl6/Metamodel/ParametricRoleHOW.nqp
Expand Up @@ -168,10 +168,10 @@ class Perl6::Metamodel::ParametricRoleHOW
}
if $error {
nqp::die("Could not instantiate role '" ~ self.name($obj)
~ "':\n" ~ nqp::getpayload($error))
~ "':\n" ~ (nqp::getpayload($error) || nqp::getmessage($error)))
}

# Use it to build concrete role.
# Use it to build a concrete role.
$conc := self.specialize_with($obj, $conc, $type_env, @pos_args);
nqp::if(
nqp::can($class.HOW, 'add_conc_to_cache'),
Expand Down
1 change: 1 addition & 0 deletions src/Perl6/Metamodel/RoleToClassApplier.nqp
Expand Up @@ -38,6 +38,7 @@ my class RoleToClassApplier {
else {
$to_compose := $concrete.new_type();
$to_compose_meta := $to_compose.HOW;
$to_compose_meta.set_language_revision($to_compose, $target.HOW.language-revision($target));
for @roles {
$to_compose_meta.add_role($to_compose, $_);
}
Expand Down
1 change: 1 addition & 0 deletions src/Perl6/Metamodel/RoleToRoleApplier.nqp
Expand Up @@ -157,6 +157,7 @@ my class RoleToRoleApplier {
for $how.multi_methods_to_incorporate($role) {
my $name := $_.name;
my $to_add := $_.code;
next if !$with_submethods && nqp::istype($to_add, $submethod_type);
my $yada := 0;
try { $yada := $to_add.yada; }
if $yada {
Expand Down

0 comments on commit dd36a35

Please sign in to comment.