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

@ -164,6 +164,9 @@ proc mapType(typ: PType): TCTypeKind =
of tySet: result = mapSetType(typ)
of tyOpenArray, tyArray, tyVarargs: result = ctArray
of tyObject, tyTuple: result = ctStruct
of tyUserTypeClass, tyUserTypeClassInst:
internalAssert typ.isResolvedUserTypeClass
return mapType(typ.lastSon)
of tyGenericBody, tyGenericInst, tyGenericParam, tyDistinct, tyOrdinal,
tyTypeDesc, tyAlias, tyInferred:
result = mapType(lastSon(typ))