Skip to content

StaticArrays.SUnitRange <: AbstractUnitRange should be true? #978

Open
@hyrodium

Description

@hyrodium

Here's a small example.

julia> Base.OneTo <: AbstractUnitRange
true

julia> Base.UnitRange <: AbstractUnitRange
true

julia> StaticArrays.SOneTo <: AbstractUnitRange
true

julia> StaticArrays.SUnitRange <: AbstractUnitRange
false

Related comment: #855 (comment)

I think we have the following choices.

  • Make abstract subtype StaticUnitRange for static range and make hierarchy SUnitRange <: StaticUnitRange <: AbstractUnitRange and SOneTo <: StaticUnitRange <: AbstractUnitRange.
  • Move SOneTo <: AbstractUnitRange to SOneTo <: StaticArray.

I prefer the first. Are there any thoughts on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions