diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-19 18:52:29 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-19 18:52:29 +0100 |
commit | 953cc7fb139dc2ba8590f8b03a095b63f4e1208f (patch) | |
tree | 46c1f330596b30fc64f29380c2cd4d2e6489fa56 /src/eval.c | |
parent | 3905e291fe4375ca5c59efa9ffcb01a39c7be3a9 (diff) |
patch 7.4.1606v7.4.1606
Problem: Having type() handle a Funcref that is or isn't a partial
differently causes problems for existing scripts.
Solution: Make type() return the same value. (Thinca)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index a2288f9f27..69969fe609 100644 --- a/src/eval.c +++ b/src/eval.c @@ -20398,6 +20398,7 @@ f_type(typval_T *argvars, typval_T *rettv) { case VAR_NUMBER: n = 0; break; case VAR_STRING: n = 1; break; + case VAR_PARTIAL: case VAR_FUNC: n = 2; break; case VAR_LIST: n = 3; break; case VAR_DICT: n = 4; break; @@ -20411,7 +20412,6 @@ f_type(typval_T *argvars, typval_T *rettv) break; case VAR_JOB: n = 8; break; case VAR_CHANNEL: n = 9; break; - case VAR_PARTIAL: n = 10; break; case VAR_UNKNOWN: EMSG2(_(e_intern2), "f_type(UNKNOWN)"); n = -1; |