Skip to content

Commit

Permalink
fix type inference for iteration with stagedfunction
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Nov 13, 2014
1 parent b9744b1 commit 05a5277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ eachindex(A::AbstractArray) = IndexIterator(size(A))
# start iteration
start(A::AbstractArray) = start((A,linearindexing(A)))
start(::(AbstractArray,LinearFast)) = 1
start{T,N}(AT::(AbstractArray{T,N},LinearSlow)) = CartesianIndex(ntuple(N,n->(isempty(AT[1]) ? typemax(Int) : 1)))
start{T,N}(AT::(AbstractArray{T,N},LinearSlow)) = CartesianIndex(ntuple(N,n->ifelse(isempty(AT[1]),typemax(Int),1))::NTuple{N,Int})

# Ambiguity resolution
done(R::StepRange, I::CartesianIndex{1}) = getfield(I, 1) > length(R)
Expand Down

0 comments on commit 05a5277

Please sign in to comment.