From e5e489d8bbc83ff61d648ad58612b312c92f1c12 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sat, 1 Nov 2014 08:07:59 -0700 Subject: [PATCH] add a test for getindex(::Number, ::Real) ref b718cbc72e90 --- test/arrayops.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/arrayops.jl b/test/arrayops.jl index 8b74f10fedc4d..7aede5b07b403 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -920,3 +920,8 @@ function pr8622() return indexin(x,y) end @test pr8622() == [0,3,1,0] + +# commit b718cbc72e90, getindex(::Number, ::Real) +b718cbc = 5 +@test b718cbc[1.0] == 5 +@test_throws InexactError b718cbc[1.1]