scoped memory management (#14790)

* fixes the regressions
* closes #13936
* scope based memory management implemented
* enabled tcontrolflow.nim test case
* final cleanups
This commit is contained in:
Andreas Rumpf 2020-07-04 07:37:24 +02:00 • committed by GitHub
commit 1854d29781
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 611 additions and 477 deletions

View file

@ -3,6 +3,8 @@ discard """
output: '''copied
copied
2
destroyed
destroyed
copied
copied
2
@ -37,9 +39,9 @@ proc test(a: range[0..1], arg: ObjWithDestructor) =
inc iteration
case a
of 0:
assert false
of 1:
of 0:
assert false
of 1:
echo b
if iteration == 2:
break