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:
parent
695154970d
commit
1854d29781
17 changed files with 611 additions and 477 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue