Skip to content

length does not work for interval ranges #281

@dlfivefifty

Description

@dlfivefifty
julia> 1:@interval(5) |> length
ERROR: MethodError: no method matching Integer(::IntervalArithmetic.Interval{Float64})
Closest candidates are:
  Integer(::T<:Number) where T<:Number at boot.jl:741
  Integer(::Integer) at boot.jl:765
  Integer(::Union{Float32, Float64}) at boot.jl:766
  ...
Stacktrace:
 [1] unsafe_length(::UnitRange{IntervalArithmetic.Interval{Float64}}) at ./range.jl:513
 [2] length(::UnitRange{IntervalArithmetic.Interval{Float64}}) at ./range.jl:515
 [3] |>(::UnitRange{IntervalArithmetic.Interval{Float64}}, ::typeof(length)) at ./operators.jl:813
 [4] top-level scope at none:0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions