Skip to content

AbstractVector is always considered mutable, even if it's not #13

@matthias314

Description

@matthias314

Example:

julia> union(1:1, 2:2)
2-element Vector{Int64}:
 1
 2

julia> union!!(1:1, 2:2)
ERROR: CanonicalIndexError: setindex! not defined for UnitRange{Int64}

The problem seems to be

julia> BangBang.implements(push!, UnitRange)
true

which is a special case of

implements(::Mutator, ::Type{<:MaybeMutableContainer}) = true

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