support for inferring static[T] concept params

This commit is contained in:
Zahary Karadjov 2016-08-02 05:15:19 +03:00
commit 76c663f692
8 changed files with 144 additions and 28 deletions

View file

@ -122,6 +122,7 @@ proc isTypeParam(n: PNode): bool =
proc hasGenericArguments*(n: PNode): bool =
if n.kind == nkSym:
return n.sym.kind == skGenericParam or
tfInferrableStatic in n.sym.typ.flags or
(n.sym.kind == skType and
n.sym.typ.flags * {tfGenericTypeParam, tfImplicitTypeParam} != {})
else: