From: Bram Moolenaar Date: Sun, 27 Mar 2022 15:51:04 +0000 (+0100) Subject: patch 8.2.4635: tests using null list or dict fail X-Git-Tag: v8.2.4635 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=501f978288008c2e4e8761858af2e27b14223afd;p=vim patch 8.2.4635: tests using null list or dict fail Problem: Tests using null list or dict fail. Solution: Only use the new rules for Vim9 script. --- diff --git a/src/evalvars.c b/src/evalvars.c index 19a0f3389..b49178f12 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 6986aaa57..2ab46bb53 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4635, /**/ 4634, /**/