diff options
author | Araq <rumpf_a@web.de> | 2014-02-05 23:43:13 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-02-05 23:43:13 +0100 |
commit | d912d1837963b11e1df622c7b41e39827f95599c (patch) | |
tree | 09c987c5474376e4cd34c226d0d367d29f7840a0 /compiler/semstmts.nim | |
parent | c097acedd30602fba903ed4ee132b5e5bae91017 (diff) | |
download | Nim-d912d1837963b11e1df622c7b41e39827f95599c.tar.gz |
tyTypeDesc and tyRange always have 1 child; this might be tyNone but it is required for skipTypes
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index d3cc1a12e..0871b7fb7 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -740,7 +740,7 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) = # we fill it out later. For magic generics like 'seq', it won't be filled # so we use tyEmpty instead of nil to not crash for strange conversions # like: mydata.seq - rawAddSon(s.typ, newTypeS(tyEmpty, c)) + rawAddSon(s.typ, newTypeS(tyNone, c)) s.ast = a inc c.inGenericContext var body = semTypeNode(c, a.sons[2], nil) @@ -748,7 +748,7 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) = if body != nil: body.sym = s body.size = -1 # could not be computed properly - s.typ.sons[sonsLen(s.typ) - 1] = body + s.typ.sons[sonsLen(s.typ) - 1] = body popOwner() closeScope(c) elif a.sons[2].kind != nkEmpty: |