Skip to content

Commit fee589b

Browse files
authored
Merge pull request #8 from yha/no-offset-ambiguity-resolve
2 parents 2fd9f4b + dfa4db9 commit fee589b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Project.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ url = "https://github.com/Vexatos/CircularArrays.jl"
77
version = "1.1.1"
88

99
[deps]
10+
# The OffsetArrays dependency is not used.
11+
# It's listed as a dependency to allow a compat entry, since versions earlier
12+
# than OffsetArrays 1.3 would cause method ambiguities with this package,
13+
# which are triggered by similar(arr) when arr.data::OffsetArray.
14+
# See #3, #8 and OffsetArrays#6.
1015
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
1116

1217
[compat]
13-
OffsetArrays = "1.1.2"
18+
OffsetArrays = "1.3"
1419
julia = "1.3"

src/CircularArrays.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ CircularArray(def::T, size) where T = CircularArray(fill(def, size))
4646
@inline Base.similar(arr::CircularArray, ::Type{T}, dims::Tuple{Base.DimOrInd, Vararg{Base.DimOrInd}}) where T = _similar(arr,T,dims)
4747
# Ambiguity resolution with Base
4848
@inline Base.similar(arr::CircularArray, ::Type{T}, dims::Tuple{Int64,Vararg{Int64}}) where T = _similar(arr,T,dims)
49-
# Ambiguity resolution with a type-pirating OffsetArrays method. See OffsetArrays issue #87.
50-
# Ambiguity is triggered in the case similar(arr) where arr.data::OffsetArray.
51-
using OffsetArrays: OffsetAxisKnownLength
52-
@inline Base.similar(arr::CircularArray, ::Type{T}, dims::Tuple{OffsetAxisKnownLength, Vararg{OffsetAxisKnownLength}}) where T = _similar(arr,T,dims)
5349

5450
CircularVector(data::AbstractArray{T, 1}) where T = CircularVector{T}(data)
5551
CircularVector(def::T, size::Int) where T = CircularVector{T}(fill(def, size))

0 commit comments

Comments
 (0)