-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
testsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlibtypes and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch
Description
EDIT: it's not entirely obvious this is a bug. Below the key comparison is reduced to
foo1(::Type{Tuple{R1,Vararg{R1,N}}}) where {N,T1,R1<:AbstractUnitRange{T1}}
vs
foo2(::Type{NTuple{N,R1}}) where {N,T1,R1<:AbstractUnitRange{T1}}
I think that what this really comes down to is
julia> Tuple{} <: NTuple{0, T} where T<:AbstractUnitRange
true
original post
julia> using Test
julia> foo(::Type{NTuple{N,R1}}, ::Type{NTuple{N,R2}}) where {N,R1<:AbstractUnitRange{T1},R2<:AbstractUnitRange{T2}} where {T1,T2} =
NTuple{N,promote_type(R1,R2)}
foo (generic function with 1 method)
julia> m = first(Base.MethodList(typeof(foo).name.mt))
foo(::Type{Tuple{Vararg{R1,N}}}, ::Type{Tuple{Vararg{R2,N}}}) where {T1, T2, N, R1<:AbstractUnitRange{T1}, R2<:AbstractUnitRange{T2}} in Main at REPL[2]:1
julia> Test.has_unbound_vars(m.sig)
true
I think it's fair to say that method definition does not have unbound typevars. I am guessing this is a consequence of the loop dropping old typevars.
Metadata
Metadata
Assignees
Labels
testsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlibtypes and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch