> Did you mean for S to be T or vice versa?
Yes. I was trying to disambiguate them, but failed.

> z.parameters[1].parameters[1]
Tried that, but it caused other problems:
https://github.com/JuliaLang/julia/issues/5752

On Mon, Feb 10, 2014 at 11:35 PM, Isaiah Norton <[email protected]> wrote:
> z.parameters[1].parameters[1]
>
> ?
>
>
> On Mon, Feb 10, 2014 at 11:26 PM, Jameson Nash <[email protected]> wrote:
>>
>> I can't figure this out, so I'm hoping someone will be able to help
>> suggest a better way to parametrize this code, or solve my dilemma.
>> I've made a somewhat complicate type hierarchy, and now I need to
>> extract some information from it. The problem is, given z (or an
>> instance thereof), I can't seem to extract S:
>>
>>
>> julia> abstract A{S}
>>
>> julia> type B{T} <: A{S} end
>>
>> julia> typealias C{T<:A} Ptr{T}
>> Ptr{T<:A{T}}
>>
>> julia> z = Ptr{B{Int}}
>> Ptr{B{Int64}}
>>
>> julia> # how to go from z -> Int here
>
>

Reply via email to