summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-09-01 16:19:45 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-09-01 16:19:45 +0200
commit9c444039340c43dd3db2d2901673260b64b604a7 (patch)
treee338264842062e760d0918cf8ee2970994b746d3 /compiler
parent3a13706d7d88527dca8140bcc71a5560ba146d31 (diff)
downloadNim-9c444039340c43dd3db2d2901673260b64b604a7.tar.gz
fixes #4693
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgtypes.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index 15fefa944..0c06354d8 100644
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -812,7 +812,9 @@ proc genTypeInfoAuxBase(m: BModule; typ, origType: PType; name, base: Rope) =
 proc genTypeInfoAux(m: BModule, typ, origType: PType, name: Rope) =
   var base: Rope
   if (sonsLen(typ) > 0) and (typ.sons[0] != nil):
-    base = genTypeInfo(m, typ.sons[0])
+    var x = typ.sons[0]
+    if typ.kind == tyObject: x = x.skipTypes(skipPtrs)
+    base = genTypeInfo(m, x)
   else:
     base = rope("0")
   genTypeInfoAuxBase(m, typ, origType, name, base)