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)` (#46547)

This improvement prevents invalidations in binaryplatforms.jl when loading Static.jl.
  • Loading branch information
ranocha authored Aug 31, 2022
1 parent f1f5d59 commit 25a07bf
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 25a07bf

Please sign in to comment.