This commit is contained in:
Andrii Riabushenko
2019-12-31 00:07:49 +00:00
parent defaf3b5a5
commit 928c2fee06
2 changed files with 9 additions and 1 deletions

View File

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

View File

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