Skip to content

Commit

Permalink
fix: define method for Base.parent to avoid recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-dunham committed Feb 6, 2024
1 parent c4dd0d6 commit b13a4c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CircularArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ abstract type AbstractCircularArray{T,N} <: AbstractArray{T,N} end
const AbstractCircularVector{T} = AbstractCircularArray{T,1}
const AbstractCircularMatrix{T} = AbstractCircularArray{T,2}

Base.parent(arg::AbstractCircularArray) = arg.data

Check warning on line 14 in src/CircularArrays.jl

View check run for this annotation

Codecov / codecov/patch

src/CircularArrays.jl#L14

Added line #L14 was not covered by tests

Base.IndexStyle(::Type{<:AbstractCircularArray}) = IndexCartesian()
Base.IndexStyle(::Type{<:AbstractCircularVector}) = IndexLinear()

Expand Down

0 comments on commit b13a4c3

Please sign in to comment.