summary refs log tree commit diff stats
path: root/tests/template/twrong_getast.nim
blob: 1d158f7a57b83ec14fe2b97cb20b59def7bc4c8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
discard """
  errormsg: "expected a template that takes 3 arguments"
  line: 16
"""

import macros

template grainBlock(proxyTypeName: untyped, proxyProcs: untyped): typed =
  discard

var
  proxyTypeName: string
  proxyProcs: string

macro foo(): untyped =
  let x = getAst grainBlock(proxyTypeName, proxyProcs, proxyTypeName)

foo()