Skip to content

Commit f063701

Browse files
authored
Add propagate_inbounds (#112)
1 parent 373b19b commit f063701

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/multidim/intervalbox.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ struct IntervalBox{N,T} <: StaticVector{N, Interval{T}}
88
end
99

1010
# StaticArrays.Size{N,T}(::Type{IntervalBox{N,T}}) = StaticArrays.Size(N) # @pure not needed, I think...
11-
Base.getindex(a::IntervalBox, i::Int) = a.data[i]
11+
Base.@propagate_inbounds Base.getindex(a::IntervalBox, i::Int) = a.data[i]
1212

1313

1414
IntervalBox(x::Interval) = IntervalBox( (x,) ) # single interval treated as tuple with one element

0 commit comments

Comments
 (0)