https://play.nim-lang.org/#ix=3KTZ
import macros
type
Vec[N: static[int], T] = object
arr: array[N, T]
Vec4[T] = Vec[4, T]
Vec4f = Vec4[float32]
var a: Vec4f
macro test(t: typed) =
echo t.treeRepr
var res = t.getTypeImpl[1]
echo res.treeRepr
assert t == res
echo t.getTypeImpl.treeRepr
echo "\n"
echo res.getTypeImpl.treeRepr
echo "\n"
assert t.getTypeImpl.repr == res.getTypeImpl.repr
#test(a)
test(Vec4f)
I'm trying to understand the behavior of getTypeImpl https://nim-lang.github.io/Nim/macros.html#getTypeImpl%2Ctypedesc In the sample code above, t and res are equal, but what they return with another getTypeImpl is not the same. Is this a bug? I want what res.getTypeImpl returns.