Skip to content

subtype broken for TypeVar with Union #11803

Closed
@timholy

Description

# Good
julia> T = TypeVar(:T, Int, true)
T<:Int64

julia> T <: Int
true

# Bad
julia> T = TypeVar(:T, Union(Int,Float64), true)
T<:Union(Int64,Float64)

julia> T <: Union(Int,Float64)
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