diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-04 20:49:50 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-04 20:49:50 +0200 |
commit | 90193e6140e5e7f1945e3e144a95697b0e16237a (patch) | |
tree | 972a396bb2bf0330c423034e7c3bb32605f407a6 /src/vim9execute.c | |
parent | 26af8e54ff0d423b7258ef84d175c8570740629a (diff) | |
download | vim-git-90193e6140e5e7f1945e3e144a95697b0e16237a.tar.gz |
patch 8.2.2710: Vim9: not all tests cover script and :def functionv8.2.2710
Problem: Vim9: not all tests cover script and :def function.
Solution: Run tests in both if possible. Fix differences.
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r-- | src/vim9execute.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c index 6e011ba2f..d3e2af772 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -3962,9 +3962,16 @@ on_fatal_error: done: // function finished, get result from the stack. - tv = STACK_TV_BOT(-1); - *rettv = *tv; - tv->v_type = VAR_UNKNOWN; + if (ufunc->uf_ret_type == &t_void) + { + rettv->v_type = VAR_VOID; + } + else + { + tv = STACK_TV_BOT(-1); + *rettv = *tv; + tv->v_type = VAR_UNKNOWN; + } ret = OK; failed: |