-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
types and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch
Description
struct W{P}
p::P
end
struct U{T, N, NTuple{N, T}<:V<:Union{NTuple{2, T}, NTuple{3, T}}}
a::W{V}
end
w = W((1,2))
U(w) # UndefVarError: `V` not defined in static parameter matchingThe fact that T and N match successfully suggests that V, too, should be uniquely defined, given that the lower bound is then NTuple{2,Int}.
Not a recent regression, v1.6 behaves the same.
Origin at Discourse for context: https://discourse.julialang.org/t/adding-both-upper-bounds-and-lower-bounds-to-type-parameters/117212/4?u=nsajko
Metadata
Metadata
Assignees
Labels
types and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch