comparison src/vim9compile.c @ 32450:72ffe2b9a4b1 v9.0.1556

patch 9.0.1556: Vim9: error for missing "return" after "throw" Commit: https://github.com/vim/vim/commit/cf2610c82b64b1785af0804916789295cae45e93 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 14 19:59:59 2023 +0100 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 https://github.com/vim/vim/issues/12262)
author Bram Moolenaar <Bram@vim.org>
date Sun, 14 May 2023 21:15:03 +0200
parents b8e9ea3c1ed0
children c1f730c2b51e
comparison
equal deleted inserted replaced
32449:2a17771529af 32450:72ffe2b9a4b1
3609 case CMD_endtry: 3609 case CMD_endtry:
3610 line = compile_endtry(p, &cctx); 3610 line = compile_endtry(p, &cctx);
3611 break; 3611 break;
3612 case CMD_throw: 3612 case CMD_throw:
3613 line = compile_throw(p, &cctx); 3613 line = compile_throw(p, &cctx);
3614 cctx.ctx_had_return = TRUE;
3614 break; 3615 break;
3615 3616
3616 case CMD_eval: 3617 case CMD_eval:
3617 line = compile_eval(p, &cctx); 3618 line = compile_eval(p, &cctx);
3618 break; 3619 break;