summaryrefslogtreecommitdiffstats
path: root/src/ex_eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-14 22:41:15 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-14 22:41:15 +0200
commit32e351179eacfc84f64cd5029e221582d400bb38 (patch)
treef82085603b8f50db86eed7c2d39f9922aa35eebd /src/ex_eval.c
parente06a28f5e30f439545ac125d54ffc4e6bd6daada (diff)
patch 8.2.0753: Vim9: expressions are evaluated in the discovery phasev8.2.0753
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.
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r--src/ex_eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 4aa2658361..f7253438d7 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -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);
}