Skip to content

Vararg.hastypevars is false, but issubtype behaves otherwise #18450

Closed
@TotalVerb

Description

This is suspicious:

julia> Type{Tuple{Vararg{Int}}} <: Type{Tuple{Vararg}}
true

julia> Vararg.hastypevars
false

While !Vararg.hastypevars, issubtype is comparing as if it did.

Example of incorrect behaviour resulting:

julia> f() = ifelse(true, Tuple{Vararg{Int}}, Tuple{Vararg})
f (generic function with 1 method)

julia> f()
Tuple{Vararg}

julia> f() == Tuple{Vararg{Int}}
false

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    types and dispatchTypes, subtyping and method dispatch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions