mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
fixes #2121
This commit is contained in:
@@ -48,7 +48,7 @@ proc genVarTuple(p: BProc, n: PNode) =
|
||||
return
|
||||
genLineDir(p, n)
|
||||
initLocExpr(p, n.sons[L-1], tup)
|
||||
var t = tup.t
|
||||
var t = tup.t.getUniqueType
|
||||
for i in countup(0, L-3):
|
||||
var v = n.sons[i].sym
|
||||
if sfCompileTime in v.flags: continue
|
||||
|
||||
9
tests/tuples/tgeneric_tuple.nim
Normal file
9
tests/tuples/tgeneric_tuple.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
# bug #2121
|
||||
|
||||
type
|
||||
Item[K,V] = tuple
|
||||
key: K
|
||||
value: V
|
||||
|
||||
var q = newseq[Item[int,int]](0)
|
||||
let (x,y) = q[0]
|
||||
Reference in New Issue
Block a user