Alternative solution is here: Difference between Type{T} and T when passing type variable inside generated function? - #4 by Elrod