mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
@@ -539,7 +539,10 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =
|
||||
let lookup = cl.typeMap.lookup(t)
|
||||
if lookup != nil:
|
||||
result = lookup
|
||||
if tfUnresolved in t.flags or cl.skipTypedesc: result = result.base
|
||||
if result.kind != tyTypeDesc:
|
||||
result = makeTypeDesc(cl.c, result)
|
||||
elif tfUnresolved in t.flags or cl.skipTypedesc:
|
||||
result = result.base
|
||||
elif t.sons[0].kind != tyNone:
|
||||
result = makeTypeDesc(cl.c, replaceTypeVarsT(cl, t.sons[0]))
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ f3 10 15 25
|
||||
true true
|
||||
false true
|
||||
world
|
||||
typedescDefault
|
||||
'''
|
||||
"""
|
||||
|
||||
@@ -112,3 +113,8 @@ block:
|
||||
|
||||
echo pySubstr("Hello world", -5)
|
||||
|
||||
|
||||
# bug #11660
|
||||
|
||||
func typedescDefault(T: typedesc; arg: T = 0) = debugEcho "typedescDefault"
|
||||
typedescDefault(int)
|
||||
|
||||
Reference in New Issue
Block a user