0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.3099: Vim9: missing catch/finally not reported at script level

Problem:    Vim9: missing catch/finally not reported at script level.
Solution:   Give an error. (closes #8487)
This commit is contained in:
Bram Moolenaar
2021-07-04 14:47:30 +02:00
parent 999db2346b
commit 4197828dc6
4 changed files with 28 additions and 6 deletions

View File

@@ -936,13 +936,14 @@ typedef struct {
# define CSF_TRY 0x0100 // is a ":try"
# define CSF_FINALLY 0x0200 // ":finally" has been passed
# define CSF_THROWN 0x0400 // exception thrown to this try conditional
# define CSF_CAUGHT 0x0800 // exception caught by this try conditional
# define CSF_SILENT 0x1000 // "emsg_silent" reset by ":try"
# define CSF_CATCH 0x0400 // ":catch" has been seen
# define CSF_THROWN 0x0800 // exception thrown to this try conditional
# define CSF_CAUGHT 0x1000 // exception caught by this try conditional
# define CSF_SILENT 0x2000 // "emsg_silent" reset by ":try"
// Note that CSF_ELSE is only used when CSF_TRY and CSF_WHILE are unset
// (an ":if"), and CSF_SILENT is only used when CSF_TRY is set.
//
#define CSF_FUNC_DEF 0x2000 // a function was defined in this block
#define CSF_FUNC_DEF 0x4000 // a function was defined in this block
/*
* What's pending for being reactivated at the ":endtry" of this try