Multiple dispatch: This is a bit of an edge case, and presumably many functions in Compat are like this, but since Fix1 is broadly used:
Note that even with this PR, Compat.Fix{1} is not the same as Base.Fix1 on Julia versions earlier than 1.12.0-DEV.966. Therefore, if you wish to use this as a way to dispatch on Fix{N} for libraries compatible with Julia earlier than v1.12, you should declare a function both for Compat.Fix{1} as well as Base.Fix1. You can do this with a
@static if !isdefined(Base, :Fix)
#= Declare additional methods for Compat.Fix =#
end
Adds https://github.com/JuliaLang/julia/pull/54653.
Fixes #828.
Multiple dispatch: This is a bit of an edge case, and presumably many functions in Compat are like this, but since
Fix1
is broadly used:Note that even with this PR,
Compat.Fix{1}
is not the same asBase.Fix1
on Julia versions earlier than1.12.0-DEV.966
. Therefore, if you wish to use this as a way to dispatch onFix{N}
for libraries compatible with Julia earlier than v1.12, you should declare a function both forCompat.Fix{1}
as well asBase.Fix1
. You can do this with a