diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-03-27 16:51:04 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-27 16:51:04 +0100 |
commit | 501f978288008c2e4e8761858af2e27b14223afd (patch) | |
tree | fb49095995371932e1331eaf274e52b3465d9515 | |
parent | ec15b1cfdc5faadb529dedda58adf7fc98c839ed (diff) |
patch 8.2.4635: tests using null list or dict failv8.2.4635
Problem: Tests using null list or dict fail.
Solution: Only use the new rules for Vim9 script.
-rw-r--r-- | src/evalvars.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 19a0f33894..b49178f125 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -2822,7 +2822,8 @@ eval_variable( if (ht != &globvarht) { if (tv->v_type == VAR_DICT && tv->vval.v_dict == NULL - && type != NULL && type != &t_dict_empty) + && ((type != NULL && type != &t_dict_empty) + || !in_vim9script())) { tv->vval.v_dict = dict_alloc(); if (tv->vval.v_dict != NULL) @@ -2832,7 +2833,8 @@ eval_variable( } } else if (tv->v_type == VAR_LIST && tv->vval.v_list == NULL - && type != NULL && type != &t_list_empty) + && ((type != NULL && type != &t_list_empty) + || !in_vim9script())) { tv->vval.v_list = list_alloc(); if (tv->vval.v_list != NULL) diff --git a/src/version.c b/src/version.c index 6986aaa571..2ab46bb539 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4635, +/**/ 4634, /**/ 4633, |