Skip to content

no widening fallback for union!! with Empty as first argument #14

@matthias314

Description

@matthias314
julia> union!!(Int[], [1.5])
1-element Vector{Float64}:
 1.5

julia> union!!(Empty(Vector{Int}), [1.5])
ERROR: InexactError: Int64(1.5)

The problem seems to be the definition

_union(::Empty{T}, x) where {T} = unique!!(T(x))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions