diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim index ac29d600bf86..cf8445820580 100644 --- a/compiler/lowerings.nim +++ b/compiler/lowerings.nim @@ -60,7 +60,6 @@ proc lowerTupleUnpacking*(g: ModuleGraph; n: PNode; owner: PSym): PNode = var temp = newSym(skTemp, getIdent(g.cache, genPrefix), owner, value.info, g.config.options) temp.typ = skipTypes(value.typ, abstractInst) incl(temp.flags, sfFromGeneric) - incl(temp.flags, sfCursor) var v = newNodeI(nkVarSection, value.info) let tempAsNode = newSymNode(temp) diff --git a/tests/destructor/t12037.nim b/tests/destructor/t12037.nim index 57ebae9e4e5b..1a7d536cc68f 100644 --- a/tests/destructor/t12037.nim +++ b/tests/destructor/t12037.nim @@ -23,3 +23,12 @@ test() import tables var t = initTable[string, seq[ptr int]]() discard t.hasKeyOrPut("f1", @[]) + + +############################################# +### bug #12989 +proc bug(start: (seq[int], int)) = + let (s, i) = start + +let input = @[0] +bug((input, 0))