summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semstmts.nim')
-rwxr-xr-xcompiler/semstmts.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 8412d4783..2818ecbd1 100755
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -527,8 +527,10 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) =
       # like: mydata.seq
       addSon(s.typ, newTypeS(tyEmpty, c))
       s.ast = a
+      inc c.InGenericContext
       var body = semTypeNode(c, a.sons[2], nil)
-      if body != nil: 
+      dec c.InGenericContext
+      if body != nil:
         body.sym = s
         body.size = -1 # could not be computed properly
       s.typ.sons[sonsLen(s.typ) - 1] = body