remerge "Fixes #267"

This commit is contained in:
Zahary Karadjov 2013-08-19 01:26:37 +03:00
commit dfb5cb3c5d
5 changed files with 192 additions and 105 deletions

View file

@ -207,6 +207,11 @@ proc makeTypeDesc*(c: PContext, typ: PType): PType =
proc newTypeS(kind: TTypeKind, c: PContext): PType =
result = newType(kind, getCurrOwner())
proc newTypeWithSons*(c: PContext, kind: TTypeKind,
sons: seq[PType]): PType =
result = newType(kind, getCurrOwner())
result.sons = sons
proc errorType*(c: PContext): PType =
## creates a type representing an error state
result = newTypeS(tyError, c)