diff options
Diffstat (limited to 'compiler/semdata.nim')
-rw-r--r-- | compiler/semdata.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/semdata.nim b/compiler/semdata.nim index 72d5a5fef..b9c32a680 100644 --- a/compiler/semdata.nim +++ b/compiler/semdata.nim @@ -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) |