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

Subtyping non-transitivity involving varargs #39099

Open
Keno opened this issue Jan 5, 2021 · 2 comments · May be fixed by #48555
Open

Subtyping non-transitivity involving varargs #39099

Keno opened this issue Jan 5, 2021 · 2 comments · May be fixed by #48555
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch

Comments

@Keno
Copy link
Member

Keno commented Jan 5, 2021

A = Tuple{Tuple{Int64, Int64, Vararg{Int64, N}}, Tuple{Int64, Vararg{Int64, N}}, Tuple{Vararg{Int64, N}}} where N
B = Tuple{NTuple{N, Int}, NTuple{N, Int}, NTuple{N, Int}} where N

julia> A <: B
true

julia> A{0} <: A
true

julia> A{0} <: B
false

I believe A <: B should be false. Found while looking at #39088, but it's a separate issue. I believe #39098 comes up with the correct intersection of A and B at least, but there's still this subtyping issue.

@Keno Keno added the types and dispatch Types, subtyping and method dispatch label Jan 5, 2021
@vtjnash
Copy link
Sponsor Member

vtjnash commented Jan 5, 2021

Possibly related to #32392 also?

@JeffBezanson
Copy link
Sponsor Member

Agreed A <: B should be false.

@JeffBezanson JeffBezanson added this to the 1.7 milestone Jan 5, 2021
@JeffBezanson JeffBezanson self-assigned this Jun 3, 2021
@vtjnash vtjnash removed this from the 1.7 milestone Jun 3, 2021
@JeffBezanson JeffBezanson added the bug Indicates an unexpected problem or unintended behavior label Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants