transf: fix a clang compilation error when lineDir:on is used
This commit is contained in:
Zahary Karadjov 2012-10-13 23:31:27 +03:00
commit 4ef96a7435
5 changed files with 25 additions and 9 deletions

View file

@ -905,6 +905,12 @@ proc matchType*(a: PType, pattern: openArray[tuple[k:TTypeKind, i:int]],
a = a.sons[i]
result = a.kind == last
proc isGenericAlias*(t: PType): bool =
return t.kind == tyGenericInst and t.lastSon.kind == tyGenericInst
proc skipGenericAlias*(t: PType): PType =
return if t.isGenericAlias: t.lastSon else: t
proc matchTypeClass*(bindings: var TIdTable, typeClass, t: PType): bool =
for i in countup(0, typeClass.sonsLen - 1):
let req = typeClass.sons[i]