This was only "working" in Julia 0.3 because it gave a random answer
instead of an appropriate error:
julia> abstract AbstractFoo{T}
julia> immutable Foo{T,V} <: AbstractFoo{promote_type(T,V)} end
julia> promote_type(TypeVar(:T),TypeVar(:V))
V #nope
julia> super(Foo{Int,Float64})
AbstractFoo{Float64} #that looks OK
julia> super(Foo{Float64,Int})
AbstractFoo{Int64} # oops: nope, that's wrong
On Sun, Sep 6, 2015 at 7:32 PM Sheehan Olver <[email protected]> wrote:
> The following line code works in 0.3 and not 0.4. Is this a bug or should
> this be done differently now?
>
> *abstract AbstractFoo{T}*
>
> *immutable Foo{T,V} <: AbstractFoo{promote_type(T,V)} end*
>