From 4f9083268f2f977c72027d4f63c0186cd703b15a Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 11 May 2016 21:56:56 +0200 Subject: [PATCH] fixes #4145 --- compiler/ccgtypes.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index d4c11c20d7..195417342e 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: