TestStruct{T} is a parameteric type. Because of that you need to return new{T}(...) from the inner constructor.
Btw. you don’t need the :: T in the body of the inner constructor, because the elements of Vector{T} are already of type T.
TestStruct{T} is a parameteric type. Because of that you need to return new{T}(...) from the inner constructor.
Btw. you don’t need the :: T in the body of the inner constructor, because the elements of Vector{T} are already of type T.