Don't understand behaviour of NamedTuple{...,Tuple{...,T}} where T

I may be wrong, but I think your problem is that:

julia> Z = NamedTuple{(:a,:b), Tuple{String,T}} where T <: Real
NamedTuple{(:a, :b),Tuple{String,T}} where T<:Real

julia> isconcretetype(Z)

In other words, Z is a abstract type, it serves the purpose of dynamic dispatch (so you can use it as the type of a parameter and it works as expected) but you cannot create an instance of it. I am actually surprised that Z(x) did not give a better error message, saying there was no constructor for the abstract type.