summary refs log tree commit diff stats
path: root/tests/arc/topt_cursor.nim
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2021-03-06 22:35:02 +0100
committerGitHub <noreply@github.com>2021-03-06 22:35:02 +0100
commit38d82795daada50d9471987df6baa2d4c7899ce3 (patch)
treec553ca1b46ace7af5ec22a2eacc1d3766bbe3f54 /tests/arc/topt_cursor.nim
parentf25384adc88ffc1c270ffb233da9af80d4b6174e (diff)
downloadNim-38d82795daada50d9471987df6baa2d4c7899ce3.tar.gz
Fix #16437 (#17277)
* Fix #16437

* Fix

* Small cleanup
Diffstat (limited to 'tests/arc/topt_cursor.nim')
-rw-r--r--tests/arc/topt_cursor.nim19
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/arc/topt_cursor.nim b/tests/arc/topt_cursor.nim
index 300402094..5c35b454f 100644
--- a/tests/arc/topt_cursor.nim
+++ b/tests/arc/topt_cursor.nim
@@ -4,21 +4,18 @@ discard """
   nimout: '''--expandArc: main
 
 var
+  x_cursor
   :tmpD
-  :tmpD_1
-  :tmpD_2
 try:
-  var x_cursor = ("hi", 5)
-  x_cursor = if cond:
-    :tmpD = ("different", 54)
-    :tmpD else:
-    :tmpD_1 = ("string here", 80)
-    :tmpD_1
+  x_cursor = ("hi", 5)
+  if cond:
+    x_cursor = ("different", 54) else:
+    x_cursor = ("string here", 80)
   echo [
-    :tmpD_2 = `$`(x_cursor)
-    :tmpD_2]
+    :tmpD = `$`(x_cursor)
+    :tmpD]
 finally:
-  `=destroy`(:tmpD_2)
+  `=destroy`(:tmpD)
 -- end of expandArc ------------------------
 --expandArc: sio