]> granicus.if.org Git - vim/commitdiff
patch 8.2.4635: tests using null list or dict fail v8.2.4635
authorBram Moolenaar <Bram@vim.org>
Sun, 27 Mar 2022 15:51:04 +0000 (16:51 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 27 Mar 2022 15:51:04 +0000 (16:51 +0100)
Problem:    Tests using null list or dict fail.
Solution:   Only use the new rules for Vim9 script.

src/evalvars.c
src/version.c

index 19a0f33894743538816506c188aaab3c44ed692a..b49178f125f5e190c136d5cfc81e79646ac5e7bd 100644 (file)
@@ -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)
index 6986aaa571aa56a8dc6e51c0f6769b11460802be..2ab46bb5396b3cb82f1dac65d9a0a800c3991af3 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4635,
 /**/
     4634,
 /**/