Skip to content

Commit

Permalink
add a test for getindex(::Number, ::Real)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkelman committed Nov 1, 2014
1 parent a25f17d commit e5e489d
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 @@ -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]

2 comments on commit e5e489d

@tkelman
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaBackports, the fix was backported at 3ad21b0, should probably also backport the test (assuming it passes)

@tkelman
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backported in 8119a29

Please sign in to comment.