summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2016-12-23 12:27:14 +0100
committerAraq <rumpf_a@web.de>2016-12-23 12:27:14 +0100
commit93fb8b67b96e7df58fea34d1edfa800ff5dffd12 (patch)
tree626b7652ec61302af92e3702f12647a859ff106d /compiler
parent77d5d0cdfe5ac1dfbf590beb10d0ab1d84b14b3a (diff)
downloadNim-93fb8b67b96e7df58fea34d1edfa800ff5dffd12.tar.gz
fixes #5142
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgtypes.nim10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index a173095e8..aa0b983ff 100644
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -116,16 +116,18 @@ proc mangleName(m: BModule; s: PSym): Rope =
       add(result, m.idOrSig(s))
     s.loc.r = result
 
+
+const
+  irrelevantForBackend = {tyGenericBody, tyGenericInst, tyGenericInvocation,
+                          tyDistinct, tyRange, tyStatic, tyAlias}
+
 proc typeName(typ: PType): Rope =
+  let typ = typ.skipTypes(irrelevantForBackend)
   result = if typ.sym != nil and typ.kind in {tyObject, tyEnum}:
              typ.sym.name.s.mangle.rope
            else:
              ~"TY"
 
-const
-  irrelevantForBackend = {tyGenericBody, tyGenericInst, tyGenericInvocation,
-                          tyDistinct, tyRange, tyStatic, tyAlias}
-
 proc getTypeName(m: BModule; typ: PType; sig: SigHash): Rope =
   var t = typ
   while true: