abstract type MM{A} end
t = TypeVar(:T)
ff(::Type{T}) where T = T
MM{t} # this returns MM{T}, obviously a DataType
ff(Int) # this returns Int
ff(MM{t}) # ERROR: UndefVarError: T not defined
I see that I can’t construct a type using TypeVar.
How can I get this done? Is there a way to expand a type consisting of a typevar to a full type?
Thanks