mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes #5142
This commit is contained in:
@@ -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:
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user