Mercurial > vim
diff src/vim9execute.c @ 24339:236e9ebdb30e v8.2.2710
patch 8.2.2710: Vim9: not all tests cover script and :def function
Commit: https://github.com/vim/vim/commit/90193e6140e5e7f1945e3e144a95697b0e16237a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 4 20:49:50 2021 +0200
patch 8.2.2710: Vim9: not all tests cover script and :def function
Problem: Vim9: not all tests cover script and :def function.
Solution: Run tests in both if possible. Fix differences.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Apr 2021 21:00:04 +0200 |
parents | 52a0e187264b |
children | 79fda175df83 |
line wrap: on
line diff
--- 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: