Skip to content

Commit

Permalink
fixes #12989
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldome committed Dec 31, 2019
1 parent defaf3b commit 928c2fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion compiler/lowerings.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions tests/destructor/t12037.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit 928c2fe

Please sign in to comment.