Skip to content

Commit

Permalink
Add comments to bad reduce dispatches
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Oct 13, 2023
1 parent 09a9541 commit 5a51616
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6496,6 +6496,7 @@ function Base.vcat(A::MatrixElem{T}...) where T <: NCRingElement
return _vcat(A)
end

# this leads to an ambiguity when calling `reduce(hcat, Union{}[])`, but we don't have a better solution right now

Check warning on line 6499 in src/Matrix.jl

View check run for this annotation

Codecov / codecov/patch

src/Matrix.jl#L6499

Added line #L6499 was not covered by tests
Base.reduce(::typeof(vcat), A::AbstractVector{<:MatrixElem}) = _vcat(A)

function _vcat(A)
Expand Down Expand Up @@ -6534,6 +6535,7 @@ function Base.hcat(A::MatrixElem{T}...) where T <: NCRingElement
return _hcat(A)
end

# this leads to an ambiguity when calling `reduce(hcat, Union{}[])`, but we don't have a better solution right now
Base.reduce(::typeof(hcat), A::AbstractVector{<:MatrixElem}) = _hcat(A)

function _hcat(A)
Expand Down

0 comments on commit 5a51616

Please sign in to comment.