summary refs log tree commit diff stats
path: root/tests/generics/tfriends.nim
Commit message (Expand)AuthorAgeFilesLines
* some test cleanups & category reorganization (#22010)metagn2023-06-061-0/+11
.de> 2015-03-17 17:50:32 +0100 Rename PNimrodNode to NimNode' href='/ahoang/Nim/commit/tests/macros/tvarnimnode.nim?h=devel&id=fd4e6299057b0ce59a89553e7c32a9ea62da14db'>fd4e62990 ^
3ec297387 ^


000b8afd2 ^
3ec297387 ^





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19







             
                                           


                                                 
                                   





                      
discard """
  output: 10
"""

#bug #926

import macros

proc test(f: var NimNode) {.compileTime.} =
  f = newNimNode(nnkStmtList)
  f.add newCall(newIdentNode("echo"), newLit(10))

macro blah(prc: untyped): untyped =
  result = prc

  test(result)

proc test() {.blah.} =
  echo 5