Skip to content

Commit

Permalink
make tsets test green again
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Dec 22, 2016
1 parent 0f9d746 commit 237e266
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions compiler/ccgtypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 237e266

Please sign in to comment.