summary refs log tree commit diff stats
path: root/compiler/semgnrc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semgnrc.nim')
-rw-r--r--compiler/semgnrc.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim
index 5972f3b55..2810fca9e 100644
--- a/compiler/semgnrc.nim
+++ b/compiler/semgnrc.nim
@@ -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)