summary refs log tree commit diff stats
path: root/tests/arc
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-05-16 03:17:06 +0800
committerGitHub <noreply@github.com>2023-05-15 21:17:06 +0200
commitce1ba915732dfff88cd9e7d975060a2a2250cd72 (patch)
treec654cf525b555baefe92570cb6608bfad448a1ed /tests/arc
parentcf1ab2a30b254a913dce14417e5a8f51439b987f (diff)
downloadNim-ce1ba915732dfff88cd9e7d975060a2a2250cd72.tar.gz
close #19990; adds a test case (#21853)
Diffstat (limited to 'tests/arc')
-rw-r--r--tests/arc/tarc_orc.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/arc/tarc_orc.nim b/tests/arc/tarc_orc.nim
index 981567350..2fbb2e792 100644
--- a/tests/arc/tarc_orc.nim
+++ b/tests/arc/tarc_orc.nim
@@ -45,3 +45,17 @@ proc main() = # todo bug with templates
     doAssert b() == @[]
 static: main()
 main()
+
+
+type Obj = tuple
+  value: int
+  arr: seq[int]
+
+proc bug(): seq[Obj] =
+  result.add (value: 0, arr: @[])
+  result[^1].value = 1
+  result[^1].arr.add 1
+
+# bug #19990
+let s = bug()
+doAssert s[0] == (value: 1, arr: @[1])