parent
28a83a8388
commit
68a82f100e
2 changed files with 11 additions and 2 deletions
|
|
@ -352,6 +352,11 @@ proc semGenericStmt(c: PContext, n: PNode,
|
||||||
openScope(c)
|
openScope(c)
|
||||||
n.sons[L - 2] = semGenericStmt(c, n.sons[L-2], flags, ctx)
|
n.sons[L - 2] = semGenericStmt(c, n.sons[L-2], flags, ctx)
|
||||||
for i in countup(0, L - 3):
|
for i in countup(0, L - 3):
|
||||||
|
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)
|
addTempDecl(c, n.sons[i], skForVar)
|
||||||
openScope(c)
|
openScope(c)
|
||||||
n.sons[L - 1] = semGenericStmt(c, n.sons[L-1], flags, ctx)
|
n.sons[L - 1] = semGenericStmt(c, n.sons[L-1], flags, ctx)
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ output: '''
|
||||||
113283
|
113283
|
||||||
@[(88, 99, 11), (88, 99, 11)]
|
@[(88, 99, 11), (88, 99, 11)]
|
||||||
@[(7, 6, -28), (7, 6, -28)]
|
@[(7, 6, -28), (7, 6, -28)]
|
||||||
|
12
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -36,4 +37,7 @@ for i, (a, b, c) in x.mpairs:
|
||||||
c = -28
|
c = -28
|
||||||
echo x
|
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