twrong_getast.nim 336 B

1234567891011121314151617181920
  1. discard """
  2. errormsg: "expected a template that takes 3 arguments"
  3. line: 16
  4. """
  5. import macros
  6. template grainBlock(proxyTypeName: untyped, proxyProcs: untyped): typed =
  7. discard
  8. var
  9. proxyTypeName: string
  10. proxyProcs: string
  11. macro foo(): untyped =
  12. let x = getAst grainBlock(proxyTypeName, proxyProcs, proxyTypeName)
  13. foo()