diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-29 13:43:27 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-29 13:43:27 +0100 |
commit | 7c215c58936cbebd4132ad6112d04db54b7c153e (patch) | |
tree | 828a4e93e763e10d9b565229f6788007d1552ea2 /src/evalfunc.c | |
parent | 57c732ed782607ce6a8c4f9eeb65b95a00e37701 (diff) | |
download | vim-git-7c215c58936cbebd4132ad6112d04db54b7c153e.tar.gz |
patch 8.2.0331: internal error when using test_void() and test_unknown()v8.2.0331
Problem: Internal error when using test_void() and test_unknown().
(Dominique Pelle)
Solution: Give a normal error.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index ff891eaa9..3fce946bf 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1890,7 +1890,10 @@ f_empty(typval_T *argvars, typval_T *rettv) #endif case VAR_UNKNOWN: case VAR_VOID: - internal_error("f_empty(UNKNOWN)"); + // Let's not use internal_error() here, otherwise + // empty(test_unknown()) with ABORT_ON_INTERNAL_ERROR defined makes + // Vim abort. + semsg(_(e_intern2), "f_empty(UNKNOWN)"); n = TRUE; break; } @@ -8275,7 +8278,10 @@ f_type(typval_T *argvars, typval_T *rettv) case VAR_BLOB: n = VAR_TYPE_BLOB; break; case VAR_UNKNOWN: case VAR_VOID: - internal_error("f_type(UNKNOWN)"); + // Let's not use internal_error() here, otherwise + // empty(test_unknown()) with ABORT_ON_INTERNAL_ERROR defined + // makes Vim abort. + semsg(_(e_intern2), "f_type(UNKNOWN)"); n = -1; break; } |