parent
28a83a8388
commit
68a82f100e
2 changed files with 11 additions and 2 deletions
|
|
@ -352,7 +352,12 @@ proc semGenericStmt(c: PContext, n: PNode,
|
|||
openScope(c)
|
||||
n.sons[L - 2] = semGenericStmt(c, n.sons[L-2], flags, ctx)
|
||||
for i in countup(0, L - 3):
|
||||
addTempDecl(c, n.sons[i], skForVar)
|
||||
if (n.sons[i].kind == nkVarTuple):
|
||||
for s in n.sons[i]:
|
||||
if (s.kind == nkIdent):
|
||||
addTempDecl(c,s,skForVar)
|
||||
else:
|
||||
addTempDecl(c, n.sons[i], skForVar)
|
||||
openScope(c)
|
||||
n.sons[L - 1] = semGenericStmt(c, n.sons[L-1], flags, ctx)
|
||||
closeScope(c)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ output: '''
|
|||
113283
|
||||
@[(88, 99, 11), (88, 99, 11)]
|
||||
@[(7, 6, -28), (7, 6, -28)]
|
||||
12
|
||||
'''
|
||||
"""
|
||||
|
||||
|
|
@ -36,4 +37,7 @@ for i, (a, b, c) in x.mpairs:
|
|||
c = -28
|
||||
echo x
|
||||
|
||||
|
||||
proc test[n]() =
|
||||
for (a,b) in @[(1,2)]:
|
||||
echo a,b
|
||||
test[string]()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue