0
0
mirror of https://github.com/vim/vim.git synced 2025-10-12 06:44:06 -04:00

patch 8.2.0517: Vim9: cannot separate "func" and "func(): void"

Problem:    Vim9: cannot separate "func" and "func(): void".
Solution:   Use VAR_ANY for "any" and VAR_UNKNOWN for "no type".
This commit is contained in:
Bram Moolenaar
2020-04-05 21:38:23 +02:00
parent f87a0400fd
commit 4c68375057
13 changed files with 88 additions and 29 deletions

View File

@@ -2042,6 +2042,7 @@ f_empty(typval_T *argvars, typval_T *rettv)
break;
#endif
case VAR_UNKNOWN:
case VAR_ANY:
case VAR_VOID:
internal_error_no_abort("f_empty(UNKNOWN)");
n = TRUE;
@@ -5217,6 +5218,7 @@ f_len(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = dict_len(argvars[0].vval.v_dict);
break;
case VAR_UNKNOWN:
case VAR_ANY:
case VAR_VOID:
case VAR_BOOL:
case VAR_SPECIAL:
@@ -8805,6 +8807,7 @@ f_type(typval_T *argvars, typval_T *rettv)
case VAR_CHANNEL: n = VAR_TYPE_CHANNEL; break;
case VAR_BLOB: n = VAR_TYPE_BLOB; break;
case VAR_UNKNOWN:
case VAR_ANY:
case VAR_VOID:
internal_error_no_abort("f_type(UNKNOWN)");
n = -1;