summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-07-08 20:12:07 +0200
committerAraq <rumpf_a@web.de>2014-07-08 20:12:07 +0200
commitd80d8aa74d4e7471c262d95aedbe0971a1b2672a (patch)
tree5b4477c47e9c028265c6f1427241b4bd365b868a /tests
parent39ce17a73e1e9f9e0eea0fa885a7969c96f1a3b4 (diff)
downloadNim-d80d8aa74d4e7471c262d95aedbe0971a1b2672a.tar.gz
fixes #1323
Diffstat (limited to 'tests')
-rw-r--r--tests/macros/tbugs.nim (renamed from tests/macros/tbug1149.nim)12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/macros/tbug1149.nim b/tests/macros/tbugs.nim
index 3318fbfd8..3db851dd1 100644
--- a/tests/macros/tbug1149.nim
+++ b/tests/macros/tbugs.nim
@@ -11,7 +11,8 @@ true
 true
 nil'''
 
-output: '''test'''
+output: '''test
+2'''
 """
 
 type
@@ -78,3 +79,12 @@ macro testnilcheck(): stmt =
   discard nilcheck()
 
 testnilcheck()
+
+# bug #1323
+
+proc calc(): array[1, int] =
+  result[0].inc()
+  result[0].inc()
+
+const c = calc()
+echo c[0]