Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -9679,8 +9679,8 @@ nextline: goto erret; } - // Return zero if there is no return at the end. - generate_instr(&cctx, ISN_RETURN_ZERO); + // Return void if there is no return at the end. + generate_instr(&cctx, ISN_RETURN_VOID); } // When compiled with ":silent!" and there was an error don't consider the @@ -10047,7 +10047,7 @@ delete_instr(isn_T *isn) case ISN_REDIREND: case ISN_REDIRSTART: case ISN_RETURN: - case ISN_RETURN_ZERO: + case ISN_RETURN_VOID: case ISN_SHUFFLE: case ISN_SLICE: case ISN_STORE: