1 2 3 4 5 6 7 8
template detect(v: untyped) = doAssert typeof(v) is int detect: try: raise (ref ValueError)() except ValueError: 42