Skip to content

Commit

Permalink
Fixed findall(Fix2{typeof(in)}, ::ChainedVector) ambiguity.
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithWM committed Mar 15, 2023
1 parent 09e01a9 commit 8ea444c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/chainedvector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ function Base.findall(A::ChainedVector{Bool})
end

Base.findall(f::Function, x::ChainedVector) = findall(map(f, x))
Base.findall(f::Base.Fix2{typeof(in)}, x::ChainedVector) = findall(map(f, x))

function Base.filter(f, a::ChainedVector{T}) where {T}
j = 1
Expand Down
2 changes: 1 addition & 1 deletion test/chainedvector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ end
@test reduce(vcat, cv_of_abstractvectors) isa Any
@test_throws "reserved" Base.broadcasted(Base.Broadcast.ArrayStyle{Matrix}(), cv)
@test copyto!(pda_1dim, cv) isa Any
@test_broken findall(fix2in, cv) isa Any
@test findall(fix2in, cv) isa Any
# I think this should not be fixed by us as long as we don't import SparseArrays:
@test_throws MethodError copyto!(sv, cv) isa Any
end

0 comments on commit 8ea444c

Please sign in to comment.