-
Notifications
You must be signed in to change notification settings - Fork 13
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
defalg method ambiguity #21
Comments
This is a bug in Julia Base, but for the time being unfortunately it has to be resolved in InlineStrings.jl. @quinnj I propose to define the following methods:
which should resolve the issue. |
bkamins
added a commit
to bkamins/julia
that referenced
this issue
Dec 15, 2021
We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for JuliaStrings/InlineStrings.jl#21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`). Preferably this should be backported I think.
Just ran into this one myself. Hopefully a workaround can be merged soon. |
vtjnash
pushed a commit
to JuliaLang/julia
that referenced
this issue
Jan 18, 2022
We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for JuliaStrings/InlineStrings.jl#21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`).
N5N3
pushed a commit
to N5N3/julia
that referenced
this issue
Jan 24, 2022
…ng#43426) We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for JuliaStrings/InlineStrings.jl#21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`).
Similar story here: ERROR: LoadError: MethodError: defalg(::Vector{Union{}}) is ambiguous. Candidates:
defalg(v::AbstractArray{var"#s832", N} where {var"#s832"<:Union{Missing, Number}, N}) in Base.Sort at sort.jl:653
defalg(::AbstractArray{var"#s86", N} where {var"#s86"<:Union{Missing, InlineStrings.String1, InlineStrings.String15, InlineStrings.String3, InlineStrings.String7}, N}) in InlineStrings at /home/runner/.julia/packages/InlineStrings/F5Dhz/src/InlineStrings.jl:698
Possible fix, define
defalg(::AbstractArray{var"#s86", N} where {var"#s86"<:Missing, N}) Looks like the patch to |
KristofferC
pushed a commit
to JuliaLang/julia
that referenced
this issue
Feb 15, 2022
We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for JuliaStrings/InlineStrings.jl#21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`). (cherry picked from commit eb724e0)
KristofferC
pushed a commit
to JuliaLang/julia
that referenced
this issue
Feb 19, 2022
We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for JuliaStrings/InlineStrings.jl#21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`). (cherry picked from commit eb724e0)
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Feb 22, 2022
…ng#43426) We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for JuliaStrings/InlineStrings.jl#21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`).
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Mar 8, 2022
…ng#43426) We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for JuliaStrings/InlineStrings.jl#21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`).
This was backported to 1.7 |
Closed
staticfloat
pushed a commit
to JuliaLang/julia
that referenced
this issue
Dec 23, 2022
We could also consider adding `defalg(v::AbstractArray{<:Number}) = DEFAULT_UNSTABLE`, but it is unlikely that someone will want to do `Union` of `<:Number` and something other than `Missing` that still would support comparison. Relevant for JuliaStrings/InlineStrings.jl#21 (and other custom types that will want to add `defalg` support allowing for `Union` with `Missing`). (cherry picked from commit eb724e0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems like there is a method ambiguity when InlineStrings is added.
One example where it popped up in the wild: JuliaParallel/Dagger.jl#315
The text was updated successfully, but these errors were encountered: