summary refs log tree commit diff stats
path: root/tests/casestmt/t12785.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/casestmt/t12785.nim')
-rw-r--r--tests/casestmt/t12785.nim47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/casestmt/t12785.nim b/tests/casestmt/t12785.nim
deleted file mode 100644
index bf0f30d42..000000000
--- a/tests/casestmt/t12785.nim
+++ /dev/null
@@ -1,47 +0,0 @@
-discard """
-  cmd: '''nim c --newruntime $file'''
-  output: '''copied
-copied
-2
-copied
-copied
-2
-destroyed
-destroyed'''
-"""
-
-type
-  ObjWithDestructor = object
-    a: int
-proc `=destroy`(self: var ObjWithDestructor) =
-  echo "destroyed"
-
-proc `=`(self: var ObjWithDestructor, other: ObjWithDestructor) =
-  echo "copied"
-
-proc test(a: range[0..1], arg: ObjWithDestructor) =
-  var iteration = 0
-  while true:
-    {.computedGoto.}
-
-    let
-      b = int(a) * 2
-      c = a
-      d = arg
-      e = arg
-
-    discard c
-    discard d
-    discard e
-
-    inc iteration
-
-    case a
-    of 0:  
-        assert false
-    of 1:      
-      echo b
-      if iteration == 2:
-        break
-
-test(1, ObjWithDestructor())
\ No newline at end of file