We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1..missing
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On current master, 1..missing is supported and tested in runtests.jl
master
runtests.jl
IntervalSets.jl/test/runtests.jl
Lines 638 to 641 in 4a6e746
julia> 1..missing 1..missing
However, with PR #93, it now returns an error.
julia> 1..missing ERROR: promotion of types Int64 and Missing failed to change any arguments Stacktrace: [1] error(::String, ::String, ::String) @ Base ./error.jl:42 [2] sametype_error(input::Tuple{Int64, Missing}) @ Base ./promotion.jl:374 [3] not_sametype(x::Tuple{Int64, Missing}, y::Tuple{Int64, Missing}) @ Base ./promotion.jl:368 [4] promote @ ./promotion.jl:351 [inlined] [5] (ClosedInterval)(left::Int64, right::Missing) @ IntervalSets ~/.julia/dev/IntervalSets/src/interval.jl:30 [6] ..(x::Int64, y::Missing) @ IntervalSets ~/.julia/dev/IntervalSets/src/interval.jl:85 [7] top-level scope @ REPL[6]:1
I propose that 1..missing should return error because this is the same behavior as Base.range.
Base.range
julia> range(1,missing) ERROR: MethodError: no method matching (::Colon)(::Int64, ::Missing) Closest candidates are: (::Colon)(::T, ::Any, ::T) where T<:Real at ~/julia/julia-1.7.2/share/julia/base/range.jl:41 (::Colon)(::A, ::Any, ::C) where {A<:Real, C<:Real} at ~/julia/julia-1.7.2/share/julia/base/range.jl:10 (::Colon)(::T, ::Any, ::T) where T at ~/julia/julia-1.7.2/share/julia/base/range.jl:40 ... Stacktrace: [1] range_start_stop(start::Int64, stop::Missing) @ Base ./range.jl:144 [2] _range(start::Int64, step::Nothing, stop::Missing, len::Nothing) @ Base ./range.jl:127 [3] range(start::Int64, stop::Missing; length::Nothing, step::Nothing) @ Base ./range.jl:111 [4] range(start::Int64, stop::Missing) @ Base ./range.jl:111 [5] top-level scope @ REPL[3]:1
The text was updated successfully, but these errors were encountered:
x-ref #40 (comment)
Sorry, something went wrong.
I'd approve of this. (But I think we should have a deprecation.)
No branches or pull requests
On current
master
,1..missing
is supported and tested inruntests.jl
IntervalSets.jl/test/runtests.jl
Lines 638 to 641 in 4a6e746
However, with PR #93, it now returns an error.
I propose that
1..missing
should return error because this is the same behavior asBase.range
.The text was updated successfully, but these errors were encountered: