summary refs log tree commit diff stats
path: root/tests/effects
diff options
context:
space:
mode:
authorcooldome <ariabushenko@gmail.com>2020-10-28 13:24:38 +0000
committerGitHub <noreply@github.com>2020-10-28 13:24:38 +0000
commit610e9b2fe9d5908b9941939e975f394aba009b43 (patch)
treed00d7d92666a57966f327fb985f56ee7790d93a8 /tests/effects
parent0956a9953780b0952acb56806fdffa8054fe1070 (diff)
downloadNim-610e9b2fe9d5908b9941939e975f394aba009b43.tar.gz
fix #15756 (#15761)
* fix #15756

* simplify test
Diffstat (limited to 'tests/effects')
-rw-r--r--tests/effects/tstrict_funcs.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/effects/tstrict_funcs.nim b/tests/effects/tstrict_funcs.nim
index 166ab77c1..75ed9c8d9 100644
--- a/tests/effects/tstrict_funcs.nim
+++ b/tests/effects/tstrict_funcs.nim
@@ -15,3 +15,15 @@ proc get_Contig2Reads(sin: Stream, fn: string, contig2len: TableRef[string, int]
     if contig2len.haskey(parser.row[1]):
       mgetOrPut(result, parser.row[1], @[]).add(parser.row[0])
 
+
+
+block:
+  # issue #15756
+  func `&&&`[T](x: var seq[T], y: sink T): seq[T] =
+    newSeq(result, x.len + 1)
+    for i in 0..x.len-1:
+      result[i] = move(x[i])
+    result[x.len] = move(y)
+
+  var x = @[0, 1]
+  let z = x &&& 2
\ No newline at end of file