diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-05-16 03:17:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 21:17:06 +0200 |
commit | ce1ba915732dfff88cd9e7d975060a2a2250cd72 (patch) | |
tree | c654cf525b555baefe92570cb6608bfad448a1ed /tests/arc | |
parent | cf1ab2a30b254a913dce14417e5a8f51439b987f (diff) | |
download | Nim-ce1ba915732dfff88cd9e7d975060a2a2250cd72.tar.gz |
close #19990; adds a test case (#21853)
Diffstat (limited to 'tests/arc')
-rw-r--r-- | tests/arc/tarc_orc.nim | 14 |
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]) |