main.nim import std/macros macro printType(n: untyped): untyped = result = n echo n.intVal, ": ", n.getType() proc test(a: int, b: int16, c: int32) = discard proc main() = test( 1.printType(), 2.printType(), 3.printType() ) main() Run
This prints (at compile time): 1: int 2: int 3: int Run But I expected this (at compile time): 1: int 2: int16 3: int32 Run I need a way to get a real argument type in a proc call.