@@ -259,17 +259,15 @@ if bc_opt == bc_default || bc_opt == bc_off
259
259
@test ! occursin (" arrayref(true" , typed_40281)
260
260
end
261
261
262
- @testset " pass inbounds meta to getindex on CartesianIndices (#42115)" begin
263
- @inline getindex_42115 (r, i, j) = @inbounds getindex (r, i, j)
264
-
265
- R = CartesianIndices ((5 , 5 ))
266
- if bc_opt == bc_on
267
- @test_throws BoundsError getindex_42115 (R, - 1 , - 1 )
268
- @test_throws BoundsError getindex_42115 (R, 1 , - 1 )
269
- else
270
- @test getindex_42115 (R, - 1 , - 1 ) == CartesianIndex (- 1 , - 1 )
271
- @test getindex_42115 (R, 1 , - 1 ) == CartesianIndex (1 , - 1 )
272
- end
273
- end
262
+ @inline getindex_42115 (r, i, j) = @inbounds getindex (r, i, j)
274
263
264
+ R_42115 = CartesianIndices ((5 , 5 ))
265
+ if bc_opt == bc_on
266
+ @test_throws BoundsError getindex_42115 (R_42115, - 1 , - 1 )
267
+ @test_throws BoundsError getindex_42115 (R_42115, 1 , - 1 )
268
+ else
269
+ @test getindex_42115 (R_42115, - 1 , - 1 ) == CartesianIndex (- 1 , - 1 )
270
+ @test getindex_42115 (R_42115, 1 , - 1 ) == CartesianIndex (1 , - 1 )
275
271
end
272
+
273
+ end # module
0 commit comments