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)
{
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;
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;
call assert_equal(0, type(0))
call assert_equal(1, type(""))
call assert_equal(2, type(function("tr")))
+ call assert_equal(2, type(function("tr", [8])))
call assert_equal(3, type([]))
call assert_equal(4, type({}))
call assert_equal(5, type(0.0))
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1606,
/**/
1605,
/**/