add a test for getindex(::Number, ::Real)

ref b718cbc72e90

backport of e5e489d8bbc83ff61d648ad58612b312c92f1c12