diff options
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/tnocodegen_for_compiletime.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ccgbugs/tnocodegen_for_compiletime.nim b/tests/ccgbugs/tnocodegen_for_compiletime.nim new file mode 100644 index 000000000..a88ba4b32 --- /dev/null +++ b/tests/ccgbugs/tnocodegen_for_compiletime.nim @@ -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 |