summary refs log tree commit diff stats
path: root/compiler/semgnrc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semgnrc.nim')
-rwxr-xr-xcompiler/semgnrc.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim
index a2e64e785..fb98e870b 100755
--- a/compiler/semgnrc.nim
+++ b/compiler/semgnrc.nim
@@ -246,7 +246,8 @@ proc semGenericStmt(c: PContext, n: PNode,
   of nkProcDef, nkMethodDef, nkConverterDef, nkMacroDef, nkTemplateDef, 
      nkIteratorDef, nkLambda: 
     checkSonsLen(n, bodyPos + 1)
-    addPrelimDecl(c, newSymS(skUnknown, getIdentNode(n.sons[0]), c))
+    if n.kind != nkLambda:
+      addPrelimDecl(c, newSymS(skUnknown, getIdentNode(n.sons[0]), c))
     openScope(c.tab)
     n.sons[genericParamsPos] = semGenericStmt(c, n.sons[genericParamsPos], 
                                               flags, toBind)