From 237e2664e0f4f091bc7d1d288291287440f41fbd Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 22 Dec 2016 09:53:46 +0100 Subject: [PATCH] make tsets test green again --- compiler/ccgtypes.nim | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 91436842327a..2e403a61d5d8 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -127,15 +127,16 @@ const tyDistinct, tyRange, tyStatic, tyAlias} proc getTypeName(m: BModule; typ: PType; sig: SigHash): Rope = - var typ = typ + var t = typ while true: - if typ.sym != nil and {sfImportc, sfExportc} * typ.sym.flags != {}: - return typ.sym.loc.r + if t.sym != nil and {sfImportc, sfExportc} * t.sym.flags != {}: + return t.sym.loc.r - if typ.kind in irrelevantForBackend: - typ = typ.lastSon + if t.kind in irrelevantForBackend: + t = t.lastSon else: break + let typ = if typ.kind == tyAlias: typ.lastSon else: typ if typ.loc.r == nil: typ.loc.r = typ.typeName & $sig else: