0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1556: Vim9: error for missing "return" after "throw"

Problem:    Vim9: error for missing "return" after "throw".
Solution:   Set had_return flag for "throw". (closes #12262)
This commit is contained in:
Bram Moolenaar
2023-05-14 19:59:59 +01:00
parent b7398fe41c
commit cf2610c82b
3 changed files with 16 additions and 0 deletions

View File

@@ -3611,6 +3611,7 @@ compile_def_function(
break;
case CMD_throw:
line = compile_throw(p, &cctx);
cctx.ctx_had_return = TRUE;
break;
case CMD_eval: