This commit is contained in:
Araq
2016-12-23 12:27:14 +01:00
parent 77d5d0cdfe
commit 93fb8b67b9
2 changed files with 15 additions and 5 deletions

View File

@@ -116,16 +116,18 @@ proc mangleName(m: BModule; s: PSym): Rope =
add(result, m.idOrSig(s))
s.loc.r = result
proc typeName(typ: PType): Rope =
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 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"
proc getTypeName(m: BModule; typ: PType; sig: SigHash): Rope =
var t = typ
while true:

View File

@@ -0,0 +1,8 @@
discard """
cmd: "nim cpp --threads:on $file"
"""
# bug #5142
var ci: Channel[int]
ci.open