diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-06-12 18:30:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-12 18:30:56 +0200 |
commit | e6174fd58d459722847c76f8c5aa1b08a49c3e0d (patch) | |
tree | 84dcb4cd7ba78ca5adeae2466d2930df6b037ce8 | |
parent | 4a27aefe3b5652ee58b2eb85e9d09b542b087aaa (diff) | |
download | vim-git-e6174fd58d459722847c76f8c5aa1b08a49c3e0d.tar.gz |
patch 8.2.2984: Vim9: test fails because of missing return statementv8.2.2984
Problem: Vim9: Test fails because of missing return statement.
Solution: When type is unknown set type to void.
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c index fcb0d927a..7f459c27a 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2984, +/**/ 2983, /**/ 2982, diff --git a/src/vim9compile.c b/src/vim9compile.c index dfd5aaa3c..47847af3a 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -9596,7 +9596,9 @@ nextline: if (!cctx.ctx_had_return) { - if (ufunc->uf_ret_type->tt_type != VAR_VOID) + if (ufunc->uf_ret_type->tt_type == VAR_UNKNOWN) + ufunc->uf_ret_type = &t_void; + else if (ufunc->uf_ret_type->tt_type != VAR_VOID) { emsg(_(e_missing_return_statement)); goto erret; |