Mercurial > repos > public > sbplib_julia
changeset 2047:491887181b8c bugfix/component_view_missing_tests
Fix broken tests
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Thu, 05 Feb 2026 23:11:04 +0100 |
| parents | 3edcf447298d |
| children | f59568c8444c |
| files | src/Grids/grid.jl |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/grid.jl Thu Feb 05 23:04:21 2026 +0100 +++ b/src/Grids/grid.jl Thu Feb 05 23:11:04 2026 +0100 @@ -74,13 +74,13 @@ end end -_array_type(v::ArrayComponentView) = typeof(v) +_array_type(v::ArrayComponentView) = _array_type(typeof(v)) _array_type(::Type{ArrayComponentView{CT,T,D,AT,IT}}) where {CT,T,D,AT,IT} = AT Base.size(cv::ArrayComponentView) = size(cv.v) Base.getindex(cv::ArrayComponentView, i::Int) = cv.v[i][cv.component_index...] Base.getindex(cv::ArrayComponentView, I::Vararg{Int}) = cv.v[I...][cv.component_index...] -Base.IndexStyle(ACT::Type{ArrayComponentView}) = IndexStyle(_array_type(ACT)) +Base.IndexStyle(ACT::Type{<:ArrayComponentView}) = IndexStyle(_array_type(ACT)) # TODO: Implement `setindex!`? # TODO: Implement a more general ComponentView that can handle non-AbstractArrays.
