mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 08:34:20 +00:00
added testcase for #1679
This commit is contained in:
9
tests/ccgbugs/tnocodegen_for_compiletime.nim
Normal file
9
tests/ccgbugs/tnocodegen_for_compiletime.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
# bug #1679
|
||||
import macros, tables, hashes
|
||||
proc hash(v: NimNode): Hash = 4 # performance is for suckers
|
||||
macro test(body: stmt): stmt {.immediate.} =
|
||||
var a = initCountTable[NimNode]()
|
||||
a.inc(body)
|
||||
|
||||
test:
|
||||
1 + 1
|
||||
Reference in New Issue
Block a user