Skip to content
8 changes: 7 additions & 1 deletion test/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,10 @@ A = AxisArray(OffsetArrays.OffsetArray([1 2; 3 4], 0:1, 1:2),
@test_throws ArgumentError A[4.0]
@test_throws ArgumentError A[BigFloat(1.0)]
@test_throws ArgumentError A[1.0f0]
@test_throws ArgumentError A[:,6.1]
if VERSION == v"0.5.2"
# Cannot compose @test_broken with @test_throws (Julia #21098)
# A[:,6.1] incorrectly throws a BoundsError instead of an ArgumentError on Julia 0.5.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

did anyone bisect this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I didn't bisect it, but I'm quite certain that it was JuliaLang/julia#19730. We used to check bounds with < before converting indices. Now we convert indices first. This is expected.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

huh? how, this is a problem only on 0.5.2 apparently?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this would show up as a package regression if I make an 0.5.3, so I'd like to figure out what caused this and whether it was something that should not have been backported

@test_broken A[:,6.1]
else
@test_throws ArgumentError A[:,6.1]
end