you mean why the second errors:

julia> Irrational
Irrational{sym}

julia> Irrational{sym}
ERROR: UndefVarError: sym not defined

?  Irrational is all that is needed. Would this help:

julia> Irrational{TypeVar(:T)}
Irrational{T}

On Thu, 2016-01-21 at 19:21, Scott Jones <[email protected]> wrote:
> I ran across something strange today, with some of the test code, that used
> something like:
> for x in [subtypes(Real) ; subtypes(Complex)]
> ...
> end
>
> The issue is that subtypes(Real) returns:
>
> *julia> **subtypes(Real)*
>
> *4-element Array{Any,1}:*
>
> * AbstractFloat       *
>
> * Integer             *
>
> * Irrational{sym}     *
>
> * Rational{T<:Integer}*
>
> If instead of having subtypes(Real), I try to put the types in directly, it
> won't accept either Irrational{sym} or Rational{T<:Integer}.
> Is there a correct way to represent those?  Should Irrational{sym} be
> something like Irrational{::Symbol}?
> Is this a bug in subtypes?
>
> Thanks, Scott

Reply via email to