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 JuliaLang#10458)
  • Loading branch information
stevengj committed Nov 18, 2015
1 parent ea2ab73 commit c9e0704
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; if you are doing integer division with i/j, consider using i÷j or div(i,j) instead, equivalent to floor(Int, i/j)", :to_index)
to_index_nodep(i)
end

Expand Down

0 comments on commit c9e0704

Please sign in to comment.