Closed
Description
Here is a julia 0.6.0 example:
julia> T where String<:T<:Signed
Signed
Lower bound is simply ignored, although String
is not a subtype of Signed
.
Also, this type is not equal to Union{}
:
julia> (Ref{T} where String<:T<:Signed) <: Union{}
false
Despite the fact there are no valid instantiations of T
. Of course, when we try to instantiate the type, we got an error message:
julia> (Ref{T} where String<:T<:Signed){Int}
ERROR: TypeError: Type: in T, expected String<:T<:Signed, got Type{Int64}
julia> (Ref{T} where String<:T<:Signed){String}
ERROR: TypeError: Type: in T, expected String<:T<:Signed, got Type{String}
julia> (Ref{T} where String<:T<:Signed){Signed}
ERROR: TypeError: Type: in T, expected String<:T<:Signed, got Type{Signed}
Version info:
Julia Version 0.6.0
Commit 903644385b (2017-06-19 13:05 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)