Skip to content

Commit

Permalink
Improve type stability of `platforms_match(::AbstractPlatform, ::Abst…
Browse files Browse the repository at this point in the history
…ractPlatform)` (JuliaLang#46547)

This improvement prevents invalidations in binaryplatforms.jl when loading Static.jl.
  • Loading branch information
ranocha committed Sep 7, 2022
1 parent afb6c60 commit 90f6f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/binaryplatforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ function platforms_match(a::AbstractPlatform, b::AbstractPlatform)

# Call the comparator, passing in which objects requested this comparison (one, the other, or both)
# For some comparators this doesn't matter, but for non-symmetrical comparisons, it does.
if !comparator(ak, bk, a_comp == comparator, b_comp == comparator)
if !(comparator(ak, bk, a_comp == comparator, b_comp == comparator)::Bool)
return false
end
end
Expand Down

0 comments on commit 90f6f22

Please sign in to comment.