Skip to content

Commit daa194f

Browse files
jishnubnsajko
andauthored
update supertype
Co-authored-by: Neven Sajko <[email protected]>
1 parent e98f5b3 commit daa194f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/SOneTo.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ a `StaticArray`.
66
"""
77
SOneTo
88

9-
if isdefined(Base, :AbstractOneTo)
10-
struct SOneTo{n} <: Base.AbstractOneTo{Int}
11-
end
12-
else
13-
struct SOneTo{n} <: AbstractUnitRange{Int}
14-
end
9+
const SOneToSupertype = isdefined(Base, :AbstractOneTo) ? Base.AbstractOneTo : AbstractUnitRange
10+
struct SOneTo{n} <: SOneToSupertype{Int}
1511
end
1612

1713
SOneTo(n::Int) = SOneTo{n}()

0 commit comments

Comments
 (0)