Skip to content

Commit

Permalink
add a test for getindex(::Number, ::Real)
Browse files Browse the repository at this point in the history
ref b718cbc

backport of e5e489d
  • Loading branch information
tkelman committed Nov 18, 2014
1 parent 2c90930 commit 8119a29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/arrayops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -894,3 +894,8 @@ function i7197()
ind2sub(size(S), 5)
end
@test i7197() == (2,2)

# commit b718cbc72e90, getindex(::Number, ::Real)
b718cbc = 5
@test b718cbc[1.0] == 5
@test_throws InexactError b718cbc[1.1]

0 comments on commit 8119a29

Please sign in to comment.