migrate the static param handling to ReplaceTypeVars; fix tgenericvariant

This commit is contained in:
Zahary Karadjov 2013-12-30 19:11:42 +02:00
commit 754e2ef1db
6 changed files with 38 additions and 26 deletions

View file

@ -1227,8 +1227,8 @@ proc getSize(typ: PType): BiggestInt =
if result < 0: internalError("getSize: " & $typ.kind)
proc containsGenericTypeIter(t: PType, closure: PObject): bool =
result = t.kind in GenericTypes + tyTypeClasses +
{tyTypeDesc, tyStatic}
result = t.kind in GenericTypes + tyTypeClasses + {tyTypeDesc} or
t.kind == tyStatic and t.n == nil
proc containsGenericType*(t: PType): bool =
result = iterOverType(t, containsGenericTypeIter, nil)