diff options
author | cooldome <cdome@bk.ru> | 2019-01-18 07:51:22 +0000 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-01-18 08:51:22 +0100 |
commit | 1e63f1edb3fa594bcdce39eb5195d5f5d2644e67 (patch) | |
tree | 04b8bf5530b2b8960ed890d3f34a1aead417453b /compiler/semdata.nim | |
parent | 214f48eae9b6a02d5ba68ddf0b1e6b9a26bddacb (diff) | |
download | Nim-1e63f1edb3fa594bcdce39eb5195d5f5d2644e67.tar.gz |
destructors: first step towards fixing #9617 (#10341)
Diffstat (limited to 'compiler/semdata.nim')
-rw-r--r-- | compiler/semdata.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/semdata.nim b/compiler/semdata.nim index 735c6f6b1..a05bda32d 100644 --- a/compiler/semdata.nim +++ b/compiler/semdata.nim @@ -286,6 +286,13 @@ proc makeVarType*(c: PContext, baseType: PType; kind = tyVar): PType = result = newTypeS(kind, c) addSonSkipIntLit(result, baseType) +proc makeVarType*(owner: PSym, baseType: PType; kind = tyVar): PType = + if baseType.kind == kind: + result = baseType + else: + result = newType(kind, owner) + addSonSkipIntLit(result, baseType) + proc makeTypeDesc*(c: PContext, typ: PType): PType = if typ.kind == tyTypeDesc: result = typ |