handle arbitrary expressions dependent on static input params in proc signatures
This commit is contained in:
parent
da5d88f04e
commit
f0953db3ba
10 changed files with 60 additions and 18 deletions
|
|
@ -1053,11 +1053,15 @@ proc paramTypesMatchAux(m: var TCandidate, f, argType: PType,
|
|||
# and finally start using tyTypedesc for generic types properly.
|
||||
if argType.kind == tyGenericParam and tfWildcard in argType.flags:
|
||||
argType.assignType(f)
|
||||
argType.flags.incl tfUnresolved
|
||||
# put(m.bindings, f, argType)
|
||||
return argSemantized
|
||||
|
||||
if argType.kind != tyStatic:
|
||||
if argType.kind == tyStatic:
|
||||
if m.calleeSym.kind == skType:
|
||||
result = newNodeI(nkType, argOrig.info)
|
||||
result.typ = makeTypeFromExpr(c, arg)
|
||||
return
|
||||
else:
|
||||
var evaluated = c.semTryConstExpr(c, arg)
|
||||
if evaluated != nil:
|
||||
arg.typ = newTypeS(tyStatic, c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue