Skip to content

Commit

Permalink
Merge pull request #4802 from vrurg/fix-multi-method-regression
Browse files Browse the repository at this point in the history
Fix multi-method candidates lost when 6.e role is applied
  • Loading branch information
vrurg committed Feb 24, 2022
2 parents d53b3ee + 6b58cc0 commit 68a43f9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Perl6/Metamodel/RoleToRoleApplier.nqp
Expand Up @@ -22,9 +22,9 @@ my class RoleToRoleApplier {
for @meth_names -> $name {
my $meth := nqp::shift($meth_iterator);
# Only transfer submethods from pre-6.e roles into pre-6.e classes.
next unless !nqp::istype($meth, $submethod_type)
|| ($with_submethods
&& $role.HOW.lang-rev-before($role, 'e'));
next if nqp::istype($meth, $submethod_type)
&& !($with_submethods
&& $role.HOW.lang-rev-before($role, 'e'));
my @meth_list;
my @meth_providers;
if nqp::existskey(%meth_info_to_use, $name) {
Expand Down Expand Up @@ -159,9 +159,9 @@ my class RoleToRoleApplier {
for $how.multi_methods_to_incorporate($role) {
my $name := $_.name;
my $to_add := $_.code;
next unless nqp::istype($to_add, $submethod_type)
|| ($with_submethods
&& $role.HOW.lang-rev-before($role, 'e'));
next if nqp::istype($to_add, $submethod_type)
&& !($with_submethods
&& $role.HOW.lang-rev-before($role, 'e'));
my $yada := 0;
try { $yada := $to_add.yada; }
if $yada {
Expand Down

0 comments on commit 68a43f9

Please sign in to comment.