Personally, I hope this PR will also reignite core developers’ attention to some of the lasting semantic issues with type parameters (i.e., TypeVar) in Julia (see this post and the original issue). Technically, we don’t have well-defined semantics for <: when it applies to those parameters in a parametric type:
julia> const MyArray{N<:Any} = Array{Int, N}
Array{Int64}
julia> MyArray{1} <: Array
true
julia> 1 <: Any
ERROR: TypeError: in <:, expected Type, got a value of type Int64
julia> foo(::MyArray{N}, num) where {N<:Any} = (N === num)
foo (generic function with 1 method)
julia> foo([0], 1)
true
If we are gonna define a lower bound Core.Epsilon to exclude Union{}, we might as well also define an upper bound Core.AnyTypeVar that consistently supertypes type parameters that evaluate to bit-type variables that can serve as a type parameter.