Closed MilesCranmer closed 1 month ago
This works on 1.6.7, so seems to be a regression:
julia> struct A{N}
children::NTuple{N,A{N}}
end
julia> fieldtypes(A{2})
(Tuple{A{2}, A{2}},)
On 1.7.3 it seems to infinitely hang.
Possibly also caused by https://github.com/JuliaLang/julia/pull/43306?
When using
NTuple
in a recursive type, there is a failure of TypeVars to apply:However, this should be
Tuple{A{2}, A{2}}
.Consider
NTuple
by itself:You can use this in structs if it is not recursive:
However, if the type is recursive, the typevar fails to apply in the type parameters.
versioninfo()
:Another potentially related failure for
NTuple
field types is #55076.While this fails on 1.10.4, this works on 1.6.7.