From d0659319913ef25a45ab26491f5ccc688770c70f Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 29 Nov 2017 00:02:49 +0100 Subject: [PATCH] destructors: harden the test case --- tests/destructor/tmove_objconstr.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/destructor/tmove_objconstr.nim b/tests/destructor/tmove_objconstr.nim index 3e8a644351..20dc062f9d 100644 --- a/tests/destructor/tmove_objconstr.nim +++ b/tests/destructor/tmove_objconstr.nim @@ -25,8 +25,11 @@ proc initData(s: string): Data = result = Data(data: s, rc: 1) echo s, " created" +proc pointlessWrapper(s: string): Data = + result = initData(s) + proc main = - var x = initData"test" + var x = pointlessWrapper"test" when isMainModule: main()