* fix #15756

* simplify test
This commit is contained in:
cooldome 2020-10-28 13:24:38 +00:00 • committed by GitHub
commit 610e9b2fe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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