0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0755: Vim9: No error when variable initializer is not a constant

Problem:    Vim9: No error when variable initializer is not a constant.
Solution:   Return FAIL when trying to get a variable value.  Do not execute a
            script when an error is deteted in the first or second phase.
This commit is contained in:
Bram Moolenaar
2020-05-15 18:17:28 +02:00
parent a5d0077efb
commit 227a69de1e
4 changed files with 47 additions and 11 deletions

View File

@@ -2695,6 +2695,8 @@ eval7(
{
if (**arg == '(') // recursive!
ret = eval_func(arg, s, len, rettv, flags, NULL);
else if (flags & EVAL_CONSTANT)
ret = FAIL;
else if (evaluate)
ret = get_var_tv(s, len, rettv, NULL, TRUE, FALSE);
else