diff options
author | cooldome <cdome@bk.ru> | 2019-01-28 07:32:14 +0000 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-01-28 08:32:14 +0100 |
commit | 690f21043d7c1cad321e116fdc666b2951ba1da3 (patch) | |
tree | a4e512fbb6cba321b4f3c30fc22b68143018225b /tests/destructor | |
parent | 5fa8a61a238c08bca12da272f71692f2f103b6d8 (diff) | |
download | Nim-690f21043d7c1cad321e116fdc666b2951ba1da3.tar.gz |
isLastRead regression fix (#10463)
* fixes #10462 * add a test
Diffstat (limited to 'tests/destructor')
-rw-r--r-- | tests/destructor/tmove_objconstr.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/destructor/tmove_objconstr.nim b/tests/destructor/tmove_objconstr.nim index 875f78283..7e2b765fc 100644 --- a/tests/destructor/tmove_objconstr.nim +++ b/tests/destructor/tmove_objconstr.nim @@ -166,3 +166,12 @@ seq4 = var ii = 1 let arr2 = [newMySeq(2, 5.0), if i > 1: newMySeq(3, 1.0) else: newMySeq(0, 0.0)] var seqOfSeq2 = @[newMySeq(2, 5.0), newMySeq(3, 1.0)] + + +## issue #10462 +proc myfuncLoop(x: int): MySeqNonCopyable = + for i in 0..<x: + var cc = newMySeq(i, 5.0) + result = cc + +discard myfuncLoop(3) \ No newline at end of file |