parametrized typealias inconsistently creates subtype relation #8625
Closed
Description
If a parametrized type is created by typealias, is it a subtype of the unparametrized type? Here is an example showing that Julia is inconsistent about this question. If I run this in the latest dev version of Julia, the first println yields "false" whereas the second yields "true". By the way, I don't know what the 'correct' answer is to the question.
module testnestparam3
immutable Token{T}
container::T
end
typealias ArToken{T} Token{Array{T,1}}
println("ArToken{Int} <: ArToken = ",
ArToken{Int} <: ArToken)
println("Vector{Float64} <: Vector = ",
Vector{Float64} <: Vector)
end
kms Edit: formatting
Activity