summary refs log tree commit diff stats
path: root/tests/vm
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-07-05 07:26:06 +0200
committerGitHub <noreply@github.com>2019-07-05 07:26:06 +0200
commit28c9c062a4f845b13d9dfd5ec8d23314675f7c10 (patch)
tree00324ea508177c2a4fbd37edf3c2d88b227fed83 /tests/vm
parentb64dd795b136248a60b8476d16bfe6e964b7fe18 (diff)
downloadNim-28c9c062a4f845b13d9dfd5ec8d23314675f7c10.tar.gz
fixes #11610 (#11659)
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/tmisc_vm.nim16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/vm/tmisc_vm.nim b/tests/vm/tmisc_vm.nim
index bce0159ce..966f9d15e 100644
--- a/tests/vm/tmisc_vm.nim
+++ b/tests/vm/tmisc_vm.nim
@@ -3,7 +3,10 @@ discard """
 [127, 127, 0, 255]
 '''
 
-  nimout: '''caught Exception'''
+  nimout: '''caught Exception
+main:begin
+main:end
+'''
 """
 
 #bug #1009
@@ -24,7 +27,7 @@ template `B=`*(self: TAggRgba8, val: byte) =
 template `A=`*(self: TAggRgba8, val: byte) =
   self[3] = val
 
-proc ABGR*(val: int| int64): TAggRgba8 =
+proc ABGR*(val: int | int64): TAggRgba8 =
   var V = val
   result.R = byte(V and 0xFF)
   V = V shr 8
@@ -69,3 +72,12 @@ block:
   let x1 = fun1()
   const x2 = fun1()
   doAssert(x1 == x2)
+
+# bug #11610
+proc simpleTryFinally()=
+  try:
+    echo "main:begin"
+  finally:
+    echo "main:end"
+
+static: simpleTryFinally()