Skip to content

Ambiguity in adding Vcat and Fill #241

Closed
@jishnub

Description

@jishnub

This seems broken with FillArrays v0.13.8

julia> x = Vcat(1:2)
vcat(2-element UnitRange{Int64}):
 1
 2

julia> y = Fill(2, 2)
2-element Fill{Int64}, with entries equal to 2

julia> x + y
ERROR: MethodError: +(::ApplyArray{Int64, 1, typeof(vcat), Tuple{UnitRange{Int64}}}, ::Fill{Int64, 1, Tuple{Base.OneTo{Int64}}}) is ambiguous.

Candidates:
  +(a::AbstractArray, b::FillArrays.AbstractFill)
    @ FillArrays ~/.julia/packages/FillArrays/VUZcr/src/fillalgebra.jl:242
  +(A::Vcat, B::AbstractArray)
    @ LazyArrays ~/Dropbox/JuliaPackages/LazyArrays.jl/src/lazyconcat.jl:628

Possible fix, define
  +(::Vcat, ::FillArrays.AbstractFill)

Stacktrace:
 [1] top-level scope
   @ REPL[5]:1

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