Skip to content

[BUG] get_type_parameters loses TypeVar names #30

@mtfishman

Description

@mtfishman

For example:

julia> using TypeParameterAccessors: get_type_parameters

julia> struct MyArray{B,A} <: AbstractArray{A,B} end

julia> supertypes(MyArray)
(MyArray, AbstractArray{A, B} where {B, A}, Any)

julia> supertypes(MyArray)[2]
AbstractArray{A, B} where {B, A}

julia> Tuple(Base.unwrap_unionall(supertypes(MyArray)[2]).parameters)
(A, B)

julia> get_type_parameters(supertypes(MyArray)[2])
(T, N)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions