thygienictempl.nim 262 B

12345678910111213141516171819
  1. var
  2. e = "abc"
  3. raise newException(IOError, e & "ha!")
  4. template t() = echo(foo)
  5. var foo = 12
  6. t()
  7. template test_in(a, b, c: untyped): bool {.dirty.} =
  8. var result {.gensym.}: bool = false
  9. false
  10. when isMainModule:
  11. assert test_in(ret2, "test", str_val)