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 #8385)
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index d5951c6..9237fdf 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -590,6 +590,19 @@
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