parent
6a7f8e8ab5
commit
bab1f67971
2 changed files with 10 additions and 1 deletions
|
|
@ -539,7 +539,10 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =
|
||||||
let lookup = cl.typeMap.lookup(t)
|
let lookup = cl.typeMap.lookup(t)
|
||||||
if lookup != nil:
|
if lookup != nil:
|
||||||
result = lookup
|
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:
|
elif t.sons[0].kind != tyNone:
|
||||||
result = makeTypeDesc(cl.c, replaceTypeVarsT(cl, t.sons[0]))
|
result = makeTypeDesc(cl.c, replaceTypeVarsT(cl, t.sons[0]))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ f3 10 15 25
|
||||||
true true
|
true true
|
||||||
false true
|
false true
|
||||||
world
|
world
|
||||||
|
typedescDefault
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -112,3 +113,8 @@ block:
|
||||||
|
|
||||||
echo pySubstr("Hello world", -5)
|
echo pySubstr("Hello world", -5)
|
||||||
|
|
||||||
|
|
||||||
|
# bug #11660
|
||||||
|
|
||||||
|
func typedescDefault(T: typedesc; arg: T = 0) = debugEcho "typedescDefault"
|
||||||
|
typedescDefault(int)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue