Wield behavior of multiple dispatch

Yes, the compiler considers the union to be more specific.

julia> Base.morespecific(Union{Float64, ComplexF64}, AbstractFloat)
true

julia> Base.morespecific(Union{Float64, ComplexF64}, Number)
true
4 Likes