diff options
author | Araq <rumpf_a@web.de> | 2014-08-01 23:40:48 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-01 23:40:48 +0200 |
commit | 9673e4f2df941bfeeb3e1fe8e66d89fddea1145b (patch) | |
tree | b7178daacba45beb51b3afb453fa256a0d6285d2 /compiler/ccgutils.nim | |
parent | 821fe72ff55866737c5b1d9f356b8d142f8836c3 (diff) | |
download | Nim-9673e4f2df941bfeeb3e1fe8e66d89fddea1145b.tar.gz |
progress on deepCopy
Diffstat (limited to 'compiler/ccgutils.nim')
-rw-r--r-- | compiler/ccgutils.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/ccgutils.nim b/compiler/ccgutils.nim index 04983d6a4..6af6a857c 100644 --- a/compiler/ccgutils.nim +++ b/compiler/ccgutils.nim @@ -89,8 +89,10 @@ proc getUniqueType*(key: PType): PType = of tyTypeDesc, tyTypeClasses, tyGenericParam, tyFromExpr, tyFieldAccessor: internalError("GetUniqueType") - of tyGenericInst, tyDistinct, tyOrdinal, tyMutable, - tyConst, tyIter, tyStatic: + of tyDistinct: + if key.deepCopy != nil: result = key + else: result = getUniqueType(lastSon(key)) + of tyGenericInst, tyOrdinal, tyMutable, tyConst, tyIter, tyStatic: result = getUniqueType(lastSon(key)) of tyArrayConstr, tyGenericInvokation, tyGenericBody, tyOpenArray, tyArray, tySet, tyRange, tyTuple, |