diff src/testdir/test_vim9_script.vim @ 24934:75bd12f3bfeb v8.2.3004

patch 8.2.3004: Vim9: error for missing colon given while skipping Commit: https://github.com/vim/vim/commit/8ac681a280ffae14c30784a54587ad6cb640afbb Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 15 20:06:34 2021 +0200 patch 8.2.3004: Vim9: error for missing colon given while skipping Problem: Vim9: error for missing colon given while skipping. Solution: Do not give the error when skipping. (closes https://github.com/vim/vim/issues/8385)
author Bram Moolenaar <Bram@vim.org>
date Tue, 15 Jun 2021 20:15:03 +0200
parents 524120691c3d
children 21ec48d542a8
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -590,6 +590,19 @@ def Test_try_catch_throw()
     return 2
   enddef
   assert_equal(4, ReturnInFinally())
+
+  var lines =<< trim END
+      vim9script
+      try
+        acos('0.5')
+          ->setline(1)
+      catch
+        g:caught = v:exception
+      endtry
+  END
+  CheckScriptSuccess(lines)
+  assert_match('E808: Number or Float required', g:caught)
+  unlet g:caught
 enddef
 
 " :while at the very start of a function that :continue jumps to