That's exactly what this feature (that Steven linked to above) is
about: https://github.com/JuliaLang/julia/issues/3766
There are plans for supporting it, but it isn't implemented yet.
// T
On Saturday, October 10, 2015 at 4:34:55 PM UTC+2, cheng wang wrote:
>
> It works perfectly well. Thanks a lot!!
>
> I am curious why doesn't Julia support DenseArray{<:AbstractFloat} ??
> Since your way means exactly above.
>
> On Saturday, October 10, 2015 at 4:08:53 PM UTC+2, Gnimuc Key wrote:
>>
>> sorry, i misunderstood what you want to define.
>>
>> julia> F = TypeVar(:F, Union{}, AbstractFloat)
>> F<:AbstractFloat
>>
>> julia> type Boo{T<:DenseArray{F}}
>> x::T
>> end
>>
>> julia> Boo
>> Boo{T<:DenseArray{F<:AbstractFloat,N}}
>>
>> julia> Baz([1.2])
>> Baz{Array{Float64,1}}([1.2])
>>
>> is this what you want?
>>
>