mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14: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:
@@ -879,7 +879,8 @@ ex_eval(exarg_T *eap)
|
||||
{
|
||||
typval_T tv;
|
||||
|
||||
if (eval0(eap->arg, &tv, &eap->nextcmd, !eap->skip) == OK)
|
||||
if (eval0(eap->arg, &tv, &eap->nextcmd, eap->skip ? 0 : EVAL_EVALUATE)
|
||||
== OK)
|
||||
clear_tv(&tv);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user