diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-05 21:38:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-05 21:38:23 +0200 |
commit | 4c68375057c25e99656bc996d3fa5c6b0b6a7e6a (patch) | |
tree | 2be5b8f84ba889bab8caf91898092eaaba96216c /src/evalfunc.c | |
parent | f87a0400fd81862c33d6ad2291a56e178db7dddd (diff) |
patch 8.2.0517: Vim9: cannot separate "func" and "func(): void"v8.2.0517
Problem: Vim9: cannot separate "func" and "func(): void".
Solution: Use VAR_ANY for "any" and VAR_UNKNOWN for "no type".
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 5a5daaa5af..3b8b319fde 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -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; |