1
0
forked from aniani/vim

patch 8.2.3299: Vim9: exists() does not handle much at compile time

Problem:    Vim9: exists() does not handle much at compile time.
Solution:   Handle variable names. (closes #8688)
This commit is contained in:
Bram Moolenaar
2021-08-05 22:48:11 +02:00
parent 6f6d58c380
commit 5671f3f076
4 changed files with 34 additions and 3 deletions

View File

@@ -3417,8 +3417,8 @@ compile_call(
s = skipwhite(s);
if (*s == ')' && argvars[0].v_type == VAR_STRING
&& ((is_has && !dynamic_feature(argvars[0].vval.v_string))
|| (!is_has && (*argvars[0].vval.v_string == '+'
|| *argvars[0].vval.v_string == '&'))))
|| (!is_has && vim_strchr((char_u *)"+&:*",
*argvars[0].vval.v_string))))
{
typval_T *tv = &ppconst->pp_tv[ppconst->pp_used];