Allow tyOr,tyAnd and tyNot to be constructed in more contexts

This commit is contained in:
Zahary Karadjov 2017-04-28 17:07:54 +03:00
commit bc01835091
3 changed files with 53 additions and 18 deletions

View file

@ -277,6 +277,10 @@ proc makeTypeFromExpr*(c: PContext, n: PNode): PType =
assert n != nil
result.n = n
proc newTypeWithSons2*(kind: TTypeKind, owner: PSym, sons: seq[PType]): PType =
result = newType(kind, owner)
result.sons = sons
proc newTypeWithSons*(c: PContext, kind: TTypeKind,
sons: seq[PType]): PType =
result = newType(kind, getCurrOwner(c))