Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TotalVerb opened this issue Sep 12, 2016 · 2 comments
Closed

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

TotalVerb opened this issue Sep 12, 2016 · 2 comments
Labels
types and dispatch Types, subtyping and method dispatch

Comments

@TotalVerb
Copy link
Contributor

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
@TotalVerb
Copy link
Contributor Author

Another case (which I missed with #18467):

f() = ifelse(true, Tuple{Int, Vararg{Int}}, Tuple{Int, Vararg})

@JeffBezanson
Copy link
Sponsor Member

closed by #18457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

No branches or pull requests

3 participants