You probably already realise this, but you can do:
function f{T <: AbstractFloat}(a::Array{T})
# body
end
But I assume that is not what you were after.
Bill.
On Saturday, 10 October 2015 02:48:37 UTC+2, Mauro wrote:
>
> This is called triangular dispatch and is not currently supported. But
> it may be in the future: https://github.com/JuliaLang/julia/issues/8974
>
> On Fri, 2015-10-09 at 23:17, cheng wang <[email protected] <javascript:>>
> wrote:
> > Hello everyone,
> >
> > In Julia, T < Array{AbstractFloat} does not mean T in (Array{Float32},
> > Array{Float64}, ...).
> > I try to use {F<:AbstractFloat, T::Array{F}} to get it, however Jjulia
> does
> > not support this also.
> >
> > So, what's the Julia's way to achieve this?
> >
> > Thanks,
> > Cheng
>