Constructors for `UnionAll` types

This impression is mistaken — the problem is that you are using N for two things in a nested way, which is not allowed (how would Julia know which is which?). Try eg (note the K)

(::Type{(Thingy{K, Float64} where K)})(n::NTuple{N, Float64}) where {N} = Thingy{N, Float64}(n)

That said, I would just reverse the order of type parameters, and then you could shorten this code to something like

Thingy{Float64}(n::NTuple{N, Float64}) where N = ...

The order of type parameters is very useful for specifying unionall types like this, to the extend that it is worth defining aliases with different orders — NTuple is one of those.

1 Like