mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-28 11:26:39 +00:00
@@ -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]()
|
||||
|
||||
Reference in New Issue
Block a user