Skip to content

Commit a7c5d48

Browse files
committed
only import Base.next if it exists
1 parent 3c69dda commit a7c5d48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Sobol.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ function next!(s::SobolSeq, x::AbstractVector{<:AbstractFloat})
7878
end
7979
next!(s::SobolSeq) = next!(s, Array{Float64,1}(undef, ndims(s)))
8080

81-
import Base: next
81+
@static if isdefined(Base, :next)
82+
import Base: next
83+
end
8284
@deprecate next(s::AbstractSobolSeq) next!(s)
8385

8486
# if we know in advance how many points (n) we want to compute, then

0 commit comments

Comments
 (0)