comparison src/ex_eval.c @ 20397:c225be44692a v8.2.0753

patch 8.2.0753: Vim9: expressions are evaluated in the discovery phase Commit: https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 14 22:41:15 2020 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 14 May 2020 22:45:04 +0200
parents 2c23053c654a
children 9f921ba86d05
comparison
equal deleted inserted replaced
20396:89228c88b5c4 20397:c225be44692a
877 void 877 void
878 ex_eval(exarg_T *eap) 878 ex_eval(exarg_T *eap)
879 { 879 {
880 typval_T tv; 880 typval_T tv;
881 881
882 if (eval0(eap->arg, &tv, &eap->nextcmd, !eap->skip) == OK) 882 if (eval0(eap->arg, &tv, &eap->nextcmd, eap->skip ? 0 : EVAL_EVALUATE)
883 == OK)
883 clear_tv(&tv); 884 clear_tv(&tv);
884 } 885 }
885 886
886 /* 887 /*
887 * ":if". 888 * ":if".