Merge pull request #4369 from Varriount/fix-4363

Fix #4393
This commit is contained in:
Andreas Rumpf
2016-06-19 10:59:43 +02:00
committed by GitHub

View File

@@ -139,6 +139,7 @@ proc instantiateDestructor(c: PContext, typ: PType): PType =
t = t.skipTypes({tyGenericInst})
case t.kind
of tySequence, tyArray, tyArrayConstr, tyOpenArray, tyVarargs:
t.destructor = analyzingDestructor
if instantiateDestructor(c, t.sons[0]) != nil:
t.destructor = getCompilerProc"nimDestroyRange"
return t