Skip to content

Commit

Permalink
follow up #44786, fix findsup to return correct overlayed value
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Mar 31, 2022
1 parent 3f23c45 commit 5f3d88b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/compiler/methodtable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,20 @@ In both cases `nothing` is returned.
`overlayed` indicates if any of the matching methods comes from an overlayed method table.
"""
function findsup(@nospecialize(sig::Type), table::InternalMethodTable)
return (_findsup(sig, nothing, table.world)..., true)
return (_findsup(sig, nothing, table.world)..., false)
end

function findsup(@nospecialize(sig::Type), table::OverlayMethodTable)
match, valid_worlds = _findsup(sig, table.mt, table.world)
match !== nothing && return match, valid_worlds, false
match !== nothing && return match, valid_worlds, true
# fall back to the internal method table
fallback_match, fallback_valid_worlds = _findsup(sig, nothing, table.world)
return (
fallback_match,
WorldRange(
max(valid_worlds.min_world, fallback_valid_worlds.min_world),
min(valid_worlds.max_world, fallback_valid_worlds.max_world)),
true)
false)
end

function _findsup(@nospecialize(sig::Type), mt::Union{Nothing,Core.MethodTable}, world::UInt)
Expand Down

0 comments on commit 5f3d88b

Please sign in to comment.