* fix #15756

* simplify test

(cherry picked from commit 610e9b2fe9)
This commit is contained in:
cooldome
2020-10-28 13:24:38 +00:00
committed by narimiran
parent a4f9bc55c7
commit e39b01e126
2 changed files with 13 additions and 1 deletions

View File

@@ -126,7 +126,7 @@ proc hasSideEffect*(c: var Partitions; info: var MutationInfo): bool =
return true
return false
template isConstParam(a): bool = a.kind == skParam and a.typ.kind != tyVar
template isConstParam(a): bool = a.kind == skParam and a.typ.kind notin {tyVar, tySink}
proc variableId(c: Partitions; x: PSym): int =
for i in 0 ..< c.s.len:

View File

@@ -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