Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
matthias314 opened this issue Aug 4, 2023 · 0 comments
Open

Comments

@matthias314
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant