summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-05-14 19:59:59 +0100
committerBram Moolenaar <Bram@vim.org>2023-05-14 19:59:59 +0100
commitcf2610c82b64b1785af0804916789295cae45e93 (patch)
tree8e233fcfa61259b8ce883530fe8c9c7766a04ab8 /src/vim9compile.c
parentb7398fe41c9e1e731d058105a34158871ee83e3f (diff)
downloadvim-git-cf2610c82b64b1785af0804916789295cae45e93.tar.gz
patch 9.0.1556: Vim9: error for missing "return" after "throw"v9.0.1556
Problem: Vim9: error for missing "return" after "throw". Solution: Set had_return flag for "throw". (closes #12262)
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 477f5eed7..b894c6f29 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -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: