Skip to content

Commit

Permalink
improve deprecation warning for non-integer indexing: suggest replaci…
Browse files Browse the repository at this point in the history
…ng i/j with i÷j (see #10458)

(cherry picked from commit d2ad66c)
ref #14049
  • Loading branch information
stevengj authored and tkelman committed Nov 29, 2015
1 parent 6462964 commit 231dd4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ end
to_index_nodep(i::Real) = convert(Int,i)::Int

@noinline function to_index(i::Real)
depwarn("indexing with non Integer Reals is deprecated", :to_index)
depwarn("Indexing with non-Integer Reals is deprecated. It may be that your index arose from an integer division of the form i/j, in which case you should consider using i÷j or div(i,j) instead.", :to_index)
to_index_nodep(i)
end

Expand Down

0 comments on commit 231dd4a

Please sign in to comment.