From bd1afa9f0d13ffbe950af3a5152f5ccf86ee49e8 Mon Sep 17 00:00:00 2001 From: jishnub Date: Mon, 15 Mar 2021 15:08:53 +0400 Subject: [PATCH] Limit parameters in OrdinalRange{T1,T2}(::AbstractUnitRange) --- base/range.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/range.jl b/base/range.jl index 81a678b7691639..78148d1d3cef03 100644 --- a/base/range.jl +++ b/base/range.jl @@ -1130,7 +1130,7 @@ AbstractUnitRange{T}(r::UnitRange) where {T} = UnitRange{T}(r) AbstractUnitRange{T}(r::OneTo) where {T} = OneTo{T}(r) OrdinalRange{T1, T2}(r::StepRange) where {T1, T2<: Integer} = StepRange{T1, T2}(r) -OrdinalRange{T, T}(r::AbstractUnitRange) where {T<:Integer} = AbstractUnitRange{T}(r) +OrdinalRange{T, T}(r::AbstractUnitRange) where {T} = AbstractUnitRange{T}(r) promote_rule(::Type{StepRange{T1a,T1b}}, ::Type{StepRange{T2a,T2b}}) where {T1a,T1b,T2a,T2b} = el_same(promote_type(T1a,T2a),