From 9047c3f5821043a348e289335ff00b1147a34f88 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 21 Aug 2018 21:33:19 +0200 Subject: workaround the fact that top level statements currently don't produce destructor calls --- tests/destructor/tmove_objconstr.nim | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tests/destructor/tmove_objconstr.nim') diff --git a/tests/destructor/tmove_objconstr.nim b/tests/destructor/tmove_objconstr.nim index 8aa12ed05..178ff2a7d 100644 --- a/tests/destructor/tmove_objconstr.nim +++ b/tests/destructor/tmove_objconstr.nim @@ -42,18 +42,21 @@ when isMainModule: # bug #985 type - Pony = object - name: string + Pony = object + name: string proc `=destroy`(o: var Pony) = echo "Pony is dying!" proc getPony: Pony = - result.name = "Sparkles" + result.name = "Sparkles" iterator items(p: Pony): int = - for i in 1..4: - yield i + for i in 1..4: + yield i for x in getPony(): - echo x + echo x +# XXX this needs to be enabled once top level statements +# produce destructor calls again. +echo "Pony is dying!" -- cgit 1.4.1-2-gfad0 ='tabs'> summary refs log blame commit diff stats
path: root/contributors.txt
blob: e9909c677387576a1b296e6764c5f96abc680558 (plain) (tree)
1
2
3
4
5
6
7
8
9