diff options
author | Araq <rumpf_a@web.de> | 2015-09-14 12:42:22 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-09-14 12:42:22 +0200 |
commit | a3f791f8929871b9e20f2fd4d69571dd20b3c409 (patch) | |
tree | 7fca1c41017d38399d74fda57183d26b00c40807 /tests/ccgbugs | |
parent | 612cd25d5dd7f86380367b3a0ac823b4919eea67 (diff) | |
download | Nim-a3f791f8929871b9e20f2fd4d69571dd20b3c409.tar.gz |
added testcase for #1679
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 |