import macros, strutils
macro isInt(x: typed): stmt =
if macros.sameType( getType(int), x.getType):
echo "yea"
else:
echo "nope"
discard
let i = 0
isInt(i) # output: yea
type MyVec3[T] = tuple[x,y,z:T]
macro isMyVec3(x: typed): stmt =
if macros.sameType( getType(MyVec3[float]), x.getType):
echo "yea"
else:
echo "nope"
discard
let v : MyVec3[float] = (1.0,2.0,3.0)
isMyVec3(v) # output: nope
Edit: solved, in this context, I have to do write getType(MyVec3[float])[1] instead of getType(MyVec3[float])