diff --git a/src/utils.jl b/src/utils.jl index 6a6ab238..c4451455 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -75,7 +75,7 @@ shape() = () @inline keepvectors(x, rest...) = keepvectors(rest...) keepvectors() = () -@inline lispyprod(p, v::Vector{T}, rest...) where T = lispyprod(p*zero(T), rest...) +@inline lispyprod(p, v::AbstractVector{T}, rest...) where T = lispyprod(p*zero(T), rest...) @inline lispyprod(p, x::Number, rest...) = lispyprod(p*x, rest...) lispyprod(p) = p diff --git a/test/extrapolation/runtests.jl b/test/extrapolation/runtests.jl index 490be37b..15c20c55 100644 --- a/test/extrapolation/runtests.jl +++ b/test/extrapolation/runtests.jl @@ -101,6 +101,10 @@ using Test itp = LinearInterpolation(xs, ys, extrapolation_bc = Flat()) @test itp(8.3) ≈ ys[end] + # Issue #288 + etp = extrapolate(interpolate(collect(1:12), NoInterp()) , 0) + @test etp(0:23) == [0:12; zeros(Int, 11)] + include("type-stability.jl") include("non1.jl") end