summary refs log tree commit diff stats
path: root/tests/accept/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-05-13 19:14:49 +0200
committerAraq <rumpf_a@web.de>2011-05-13 19:14:49 +0200
commitf45967537f3696b20a4a92b2159c8de11913b556 (patch)
tree8b041099b93135fcee0ec04c9b1cc0e7931d3110 /tests/accept/compile
parentf94941964d8621c452082b47b5810f231edabfa3 (diff)
downloadNim-f45967537f3696b20a4a92b2159c8de11913b556.tar.gz
loop unrolled for stack marking
Diffstat (limited to 'tests/accept/compile')
-rw-r--r--tests/accept/compile/teval1.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/accept/compile/teval1.nim b/tests/accept/compile/teval1.nim
new file mode 100644
index 000000000..8172ebe28
--- /dev/null
+++ b/tests/accept/compile/teval1.nim
@@ -0,0 +1,19 @@
+import macros
+
+proc testProc: string {.compileTime.} =
+  result = ""
+  result = result & ""
+
+when true:
+  macro test(n: stmt): stmt =
+    result = newNimNode(nnkStmtList)
+    echo "#", testProc(), "#"
+  test:
+    "hi"
+
+const
+  x = testProc()
+  
+echo "##", x, "##"
+
+