summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-05-11 21:56:56 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-05-11 21:56:56 +0200
commit4f9083268f2f977c72027d4f63c0186cd703b15a (patch)
treebf947e0fa911e86a7618c831633f87928f331c6e /compiler
parent1ae95310ad2d7b1296596331c0a2a05c79198051 (diff)
downloadNim-4f9083268f2f977c72027d4f63c0186cd703b15a.tar.gz
fixes #4145
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgtypes.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index d4c11c20d..195417342 100644
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -570,7 +570,8 @@ proc getTypeDescAux(m: BModule, typ: PType, check: var IntSet): Rope =
   of tyRange, tyEnum:
     let t = if t.kind == tyRange: t.lastSon else: t
     result = getTypeName(t)
-    if isImportedCppType(t): return
+    if isImportedCppType(t) or
+        (sfImportc in t.sym.flags and t.sym.magic == mNone): return
     idTablePut(m.typeCache, t, result)
     var size: int
     if firstOrd(t) < 0: