Skip to content

Commit 0f321be

Browse files
committed
fix inference on 1.5/1.2
1 parent 0c4176e commit 0f321be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/indexing.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,21 +324,21 @@ should only dispatch on `A`.
324324
"""
325325
function unsafe_reconstruct(axis::OneTo, data; kwargs...)
326326
if axis === data
327-
return data
327+
return axis
328328
else
329329
return OneTo(data)
330330
end
331331
end
332332
function unsafe_reconstruct(axis::UnitRange, data; kwargs...)
333333
if axis === data
334-
return data
334+
return axis
335335
else
336336
return UnitRange(first(data), last(data))
337337
end
338338
end
339339
function unsafe_reconstruct(axis::OptionallyStaticUnitRange, data; kwargs...)
340340
if axis === data
341-
return data
341+
return axis
342342
else
343343
return OptionallyStaticUnitRange(static_first(data), static_last(data))
344344
end

0 commit comments

Comments
 (0)