diff options
author | Billy Su <g4691821@gmail.com> | 2020-04-28 23:21:50 +0800 |
---|---|---|
committer | Billy Su <g4691821@gmail.com> | 2020-06-06 23:24:58 +0800 |
commit | 1805fb469a39d998f9bef0415999aa835d051044 (patch) | |
tree | e840cff3201d735955eab935a35d3437f497607f /src/nvim/eval/executor.c | |
parent | dbc8ec94464049311e69274cad562585d7bb6749 (diff) | |
download | rneovim-1805fb469a39d998f9bef0415999aa835d051044.tar.gz rneovim-1805fb469a39d998f9bef0415999aa835d051044.tar.bz2 rneovim-1805fb469a39d998f9bef0415999aa835d051044.zip |
vim-patch:8.2.0111: VAR_SPECIAL is also used for booleans
Problem: VAR_SPECIAL is also used for booleans.
Solution: Add VAR_BOOL for better type checking.
https://github.com/vim/vim/commit/9b4a15d5dba354d2e1e02871470bad103f34769a
Diffstat (limited to 'src/nvim/eval/executor.c')
-rw-r--r-- | src/nvim/eval/executor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c index 8cd21f8d62..da05ecda43 100644 --- a/src/nvim/eval/executor.c +++ b/src/nvim/eval/executor.c @@ -28,11 +28,13 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NO_SANITIZE_UNDEFINED { // Can't do anything with a Funcref, a Dict or special value on the right. - if (tv2->v_type != VAR_FUNC && tv2->v_type != VAR_DICT) { + if (tv2->v_type != VAR_FUNC && tv2->v_type != VAR_DICT + && tv2->v_type != VAR_BOOL && tv2->v_type != VAR_SPECIAL) { switch (tv1->v_type) { case VAR_DICT: case VAR_FUNC: case VAR_PARTIAL: + case VAR_BOOL: case VAR_SPECIAL: { break; } |