Skip to content

Subtyping non-transitivity involving varargs #39099

@Keno

Description

@Keno
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.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviortypes and dispatchTypes, subtyping and method dispatch

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions