Skip to content

Commit

Permalink
Remove a overlooked call to compose
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed Dec 15, 2020
1 parent b5465b1 commit e481619
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Perl6/Metamodel/CoercionHOW.nqp
Expand Up @@ -82,8 +82,7 @@ class Perl6::Metamodel::CoercionHOW
$!constraint_type.HOW.archetypes.generic
?? $!constraint_type.HOW.instantiate_generic($!constraint_type, $type_env)
!! $!constraint_type;
my $ins := self.new_type($ins_target, $ins_constraint);
$ins.HOW.compose($ins)
self.new_type($ins_target, $ins_constraint);
}

method find_method($coercion_type, $name, *%c) {
Expand Down Expand Up @@ -155,8 +154,7 @@ class Perl6::Metamodel::CoercionHOW
}
}

# And eventually fall back to new. Note that it is invoked on the coercion type invokee to let the method know
# it's context.
# And eventually fall back to new.
if nqp::isnull($coerced_value) {
$method := nqp::tryfindmethod($nominal_target, $coercion_method := 'new');
if nqp::defined($method) && nqp::can($method, 'cando') && $method.cando($nominal_target, $value) {
Expand Down

0 comments on commit e481619

Please sign in to comment.