Skip to content

Commit

Permalink
disambiguation
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Sep 26, 2023
1 parent d1461c3 commit 12ea19b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ Base.checkindex(B::Type{Bool}, inds::AbstractUnitRange, i::StaticIndexing{T}) wh
# unsafe_view need only deal with vargs of `StaticIndexing`, as wrapped by to_indices.
# i1 is explicitly specified to avoid ambiguities with Base
Base.unsafe_view(A::AbstractArray, i1::StaticIndexing, indices::StaticIndexing...) = Base.unsafe_view(A, unwrap(i1), map(unwrap, indices)...)
# disambiguation
Base.unsafe_view(A::SubArray, i1::StaticIndexing, indices::StaticIndexing...) = Base.unsafe_view(A, unwrap(i1), map(unwrap, indices)...)

# Views of views need a new method for Base.SubArray because storing indices
# wrapped in StaticIndexing in field indices of SubArray causes all sorts of problems.
Expand Down

0 comments on commit 12ea19b

Please sign in to comment.