From a9c52dfa70e66cd9508cb8de8c777482d80827f2 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 d6b7ba8a633ff..0c41194129340 100644 --- a/base/range.jl +++ b/base/range.jl @@ -1253,7 +1253,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) function promote_rule(::Type{StepRange{T1a,T1b}}, ::Type{StepRange{T2a,T2b}}) where {T1a,T1b,T2a,T2b} Tb = promote_type(T1b, T2b)