mirror of
https://github.com/vim/vim.git
synced 2025-10-12 06:44:06 -04:00
patch 8.2.0753: Vim9: expressions are evaluated in the discovery phase
Problem: Vim9: expressions are evaluated in the discovery phase. Solution: Bail out if an expression is not a constant. Require a type for declared constants.
This commit is contained in:
@@ -2132,7 +2132,7 @@ f_eval(typval_T *argvars, typval_T *rettv)
|
||||
s = skipwhite(s);
|
||||
|
||||
p = s;
|
||||
if (s == NULL || eval1(&s, rettv, TRUE) == FAIL)
|
||||
if (s == NULL || eval1(&s, rettv, EVAL_EVALUATE) == FAIL)
|
||||
{
|
||||
if (p != NULL && !aborting())
|
||||
semsg(_(e_invexpr2), p);
|
||||
|
Reference in New Issue
Block a user