summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-04-09 00:33:51 +0200
committerAraq <rumpf_a@web.de>2014-04-09 00:33:51 +0200
commit4196757de768e5832d740e87164d0597e5f95363 (patch)
treedbc2494ad68c64c2781dfa2c5738274131aebdcf /compiler/semstmts.nim
parent3e25d5f24747c324a5a0f0deb555611166c96209 (diff)
downloadNim-4196757de768e5832d740e87164d0597e5f95363.tar.gz
implemented region pointers
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index c31a8a06d..2429e4183 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -817,8 +817,8 @@ proc typeSectionFinalPass(c: PContext, n: PNode) =
       var st = s.typ
       if st.kind == tyGenericBody: st = st.lastSon
       internalAssert st.kind in {tyPtr, tyRef}
-      internalAssert st.sons[0].sym == nil
-      st.sons[0].sym = newSym(skType, getIdent(s.name.s & ":ObjectType"),
+      internalAssert st.lastSon.sym == nil
+      st.lastSon.sym = newSym(skType, getIdent(s.name.s & ":ObjectType"),
                               getCurrOwner(), s.info)
 
 proc semTypeSection(c: PContext, n: PNode): PNode =