summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
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]