comparison src/vim9compile.c @ 24936:345619f35112 v8.2.3005

patch 8.2.3005: Vim9: using a void value does not give a proper error message Commit: https://github.com/vim/vim/commit/f57b43c230c23117650c956c1f62546a34500fb6 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 15 22:13:27 2021 +0200 patch 8.2.3005: Vim9: using a void value does not give a proper error message Problem: Vim9: using a void value does not give a proper error message. Solution: Give a clear error message. (clodes https://github.com/vim/vim/issues/8387)
author Bram Moolenaar <Bram@vim.org>
date Tue, 15 Jun 2021 22:15:03 +0200
parents cf4bc18a3931
children 5c418c774f95
comparison
equal deleted inserted replaced
24935:68f1020e0c69 24936:345619f35112
9677 { 9677 {
9678 emsg(_(e_missing_return_statement)); 9678 emsg(_(e_missing_return_statement));
9679 goto erret; 9679 goto erret;
9680 } 9680 }
9681 9681
9682 // Return zero if there is no return at the end. 9682 // Return void if there is no return at the end.
9683 generate_instr(&cctx, ISN_RETURN_ZERO); 9683 generate_instr(&cctx, ISN_RETURN_VOID);
9684 } 9684 }
9685 9685
9686 // When compiled with ":silent!" and there was an error don't consider the 9686 // When compiled with ":silent!" and there was an error don't consider the
9687 // function compiled. 9687 // function compiled.
9688 if (emsg_silent == 0 || did_emsg_silent == did_emsg_silent_before) 9688 if (emsg_silent == 0 || did_emsg_silent == did_emsg_silent_before)
10045 case ISN_PUSHSPEC: 10045 case ISN_PUSHSPEC:
10046 case ISN_PUT: 10046 case ISN_PUT:
10047 case ISN_REDIREND: 10047 case ISN_REDIREND:
10048 case ISN_REDIRSTART: 10048 case ISN_REDIRSTART:
10049 case ISN_RETURN: 10049 case ISN_RETURN:
10050 case ISN_RETURN_ZERO: 10050 case ISN_RETURN_VOID:
10051 case ISN_SHUFFLE: 10051 case ISN_SHUFFLE:
10052 case ISN_SLICE: 10052 case ISN_SLICE:
10053 case ISN_STORE: 10053 case ISN_STORE:
10054 case ISN_STOREINDEX: 10054 case ISN_STOREINDEX:
10055 case ISN_STORENR: 10055 case ISN_STORENR: