summary refs log tree commit diff stats
path: root/tests/destructor/tdestructor2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/destructor/tdestructor2.nim')
-rw-r--r--tests/destructor/tdestructor2.nim27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/destructor/tdestructor2.nim b/tests/destructor/tdestructor2.nim
deleted file mode 100644
index 34fa466af..000000000
--- a/tests/destructor/tdestructor2.nim
+++ /dev/null
@@ -1,27 +0,0 @@
-discard """
-  line: 23
-  nimout: " usage of a type with a destructor in a non destructible context"
-"""
-
-{.experimental.}
-
-type
-  TMyObj = object
-    x, y: int
-    p: pointer
-
-proc `=destroy`(o: var TMyObj) =
-  if o.p != nil: dealloc o.p
-
-proc open: TMyObj =
-  result = TMyObj(x: 1, y: 2, p: alloc(3))
-
-
-proc `$`(x: TMyObj): string = $x.y
-
-proc foo =
-  discard open()
-
-# XXX doesn't trigger this yet:
-#echo open()
-