parent
9348636cba
commit
4fd79f5b47
2 changed files with 13 additions and 1 deletions
|
|
@ -950,7 +950,8 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
|
||||||
if tfUnresolved notin paramType.flags:
|
if tfUnresolved notin paramType.flags:
|
||||||
# naked typedescs are not bindOnce types
|
# naked typedescs are not bindOnce types
|
||||||
if paramType.base.kind == tyNone and paramTypId != nil and
|
if paramType.base.kind == tyNone and paramTypId != nil and
|
||||||
paramTypId.id == getIdent(c.cache, "typedesc").id:
|
(paramTypId.id == getIdent(c.cache, "typedesc").id or
|
||||||
|
paramTypId.id == getIdent(c.cache, "type").id):
|
||||||
# XXX Why doesn't this check for tyTypeDesc instead?
|
# XXX Why doesn't this check for tyTypeDesc instead?
|
||||||
paramTypId = nil
|
paramTypId = nil
|
||||||
let t = c.newTypeWithSons(tyTypeDesc, @[paramType.base])
|
let t = c.newTypeWithSons(tyTypeDesc, @[paramType.base])
|
||||||
|
|
|
||||||
|
|
@ -82,3 +82,14 @@ reject bindArg(int, string, 10.0, 20, "test", "nest")
|
||||||
reject bindArg(int, string, "test", "nest", 10, 20)
|
reject bindArg(int, string, "test", "nest", 10, 20)
|
||||||
|
|
||||||
echo "ok"
|
echo "ok"
|
||||||
|
|
||||||
|
#11058:
|
||||||
|
template test(S: type, U: type) =
|
||||||
|
discard
|
||||||
|
|
||||||
|
test(int, float)
|
||||||
|
|
||||||
|
proc test2(S: type, U: type) =
|
||||||
|
discard
|
||||||
|
|
||||||
|
test2(float, int)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue