Skip to content

Commit

Permalink
Ignore fallback methods when looking for CUSTOM-DISPATCHER in dispatch
Browse files Browse the repository at this point in the history
When looking for a CUSTOM-DISPATCHER method on an object that is called, we
want to ignore fallback methods (like FALLBACK or the junction autothreader),
as those may give us an answer, even if there is no suitable CUSTOM-DISPATCHER
method available, leading to very confusing errors.
  • Loading branch information
niner committed Nov 19, 2021
1 parent 452781f commit f20d448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/moar/dispatchers.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -2627,7 +2627,7 @@ nqp::dispatch('boot-syscall', 'dispatcher-register', 'raku-invoke', -> $capture
}

elsif nqp::isconcrete(
my $custom-dispatcher := nqp::decont(nqp::how_nd($code).find_method($code, 'CUSTOM-DISPATCHER'))
my $custom-dispatcher := nqp::decont(nqp::how_nd($code).find_method(nqp::decont($code), 'CUSTOM-DISPATCHER', :no_fallback))
) {
nqp::dispatch('boot-syscall', 'dispatcher-delegate',
nqp::unbox_s($custom-dispatcher($code)), $capture);
Expand Down

0 comments on commit f20d448

Please sign in to comment.