summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/tdestructor2.nim10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/destructor/tdestructor2.nim b/tests/destructor/tdestructor2.nim
index 1bdf4993b..6f966d861 100644
--- a/tests/destructor/tdestructor2.nim
+++ b/tests/destructor/tdestructor2.nim
@@ -1,6 +1,6 @@
 discard """
-  line: 20
-  errormsg: " usage of a type with a destructor in a non destructible context"
+  line: 23
+  nimout: " usage of a type with a destructor in a non destructible context"
 """
 
 {.experimental.}
@@ -19,5 +19,9 @@ proc open: TMyObj =
 
 proc `$`(x: TMyObj): string = $x.y
 
-echo open()
+proc foo =
+  discard open()
+
+# XXX doesn't trigger this yet:
+#echo open()