From cf2610c82b64b1785af0804916789295cae45e93 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 14 May 2023 19:59:59 +0100 Subject: 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) --- src/vim9compile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/vim9compile.c') 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: -- cgit v1.2.1