Skip to content

Commit 2a64174

Browse files
authored
Reduce type-piracy with Base (#368)
1 parent 6af9558 commit 2a64174

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Interpolations.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ Base.:(/)(wi::WeightedArbIndex, x::Number) = WeightedArbIndex(wi.indexes, wi.wei
271271
# This is to avoid ambiguities with methods that specialize on the array type rather than
272272
# the index type.
273273
Base.to_indices(A, I::Tuple{Vararg{Union{Int,WeightedIndex}}}) = I
274-
@propagate_inbounds Base._getindex(::IndexLinear, A::AbstractVector, i::Int) = getindex(A, i) # ambiguity resolution
274+
if VERSION < v"1.6.0-DEV.104"
275+
@propagate_inbounds Base._getindex(::IndexLinear, A::AbstractVector, i::Int) = getindex(A, i) # ambiguity resolution
276+
end
275277
@inline function Base._getindex(::IndexStyle, A::AbstractArray{T,N}, I::Vararg{Union{Int,WeightedIndex},N}) where {T,N}
276278
interp_getindex(A, I, ntuple(d->0, Val(N))...)
277279
end

0 commit comments

Comments
 (0)