Closed
Description
This is a minor thing, but I guess we do not want to have dispatch ambiguities in Base:
julia> sum(skipmissing([missing]))
ERROR: MethodError: reduce_empty(::typeof(Base.add_sum), ::Type{Union{}}) is ambiguous. Candidates:
reduce_empty(::typeof(Base.add_sum), ::Type{T}) where T<:Union{Int16, Int32, Int8} in Base at reduce.jl:314
reduce_empty(::typeof(Base.add_sum), ::Type{T}) where T<:Union{UInt16, UInt32, UInt8} in Base at reduce.jl:315
Possible fix, define
reduce_empty(::typeof(Base.add_sum), ::Type{Union{}})
CC @nalimilan
Metadata
Metadata
Assignees
Labels
No labels