1
0
forked from aniani/vim

patch 7.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)
This commit is contained in:
Bram Moolenaar
2016-03-19 18:52:29 +01:00
parent 3905e291fe
commit 953cc7fb13
3 changed files with 4 additions and 1 deletions

View File

@@ -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;