mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 11:42:33 +00:00
* fix #15756
* simplify test
(cherry picked from commit 610e9b2fe9)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user