fixes #5142
This commit is contained in:
parent
77d5d0cdfe
commit
93fb8b67b9
2 changed files with 15 additions and 5 deletions
|
|
@ -116,16 +116,18 @@ proc mangleName(m: BModule; s: PSym): Rope =
|
||||||
add(result, m.idOrSig(s))
|
add(result, m.idOrSig(s))
|
||||||
s.loc.r = result
|
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
|
const
|
||||||
irrelevantForBackend = {tyGenericBody, tyGenericInst, tyGenericInvocation,
|
irrelevantForBackend = {tyGenericBody, tyGenericInst, tyGenericInvocation,
|
||||||
tyDistinct, tyRange, tyStatic, tyAlias}
|
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 =
|
proc getTypeName(m: BModule; typ: PType; sig: SigHash): Rope =
|
||||||
var t = typ
|
var t = typ
|
||||||
while true:
|
while true:
|
||||||
|
|
|
||||||
8
tests/cpp/tembarrassing_generic_failure.nim
Normal file
8
tests/cpp/tembarrassing_generic_failure.nim
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
discard """
|
||||||
|
cmd: "nim cpp --threads:on $file"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# bug #5142
|
||||||
|
|
||||||
|
var ci: Channel[int]
|
||||||
|
ci.open
|
||||||
Loading…
Add table
Add a link
Reference in a new issue