1
0
forked from aniani/vim

patch 8.2.4634: Vim9: cannot initialize a variable to null_list

Problem:    Vim9: cannot initialize a variable to null_list.
Solution:   Give negative count to NEWLIST. (closes #10027)
            Also fix inconsistencies in comparing with null values.
This commit is contained in:
Bram Moolenaar
2022-03-27 16:29:53 +01:00
parent c75bca3ee9
commit ec15b1cfdc
12 changed files with 179 additions and 84 deletions

View File

@@ -958,7 +958,7 @@ compile_list(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
*arg = p;
ppconst->pp_is_const = is_all_const;
return generate_NEWLIST(cctx, count);
return generate_NEWLIST(cctx, count, FALSE);
}
/*
@@ -1246,7 +1246,7 @@ compile_dict(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
dict_unref(d);
ppconst->pp_is_const = is_all_const;
return generate_NEWDICT(cctx, count);
return generate_NEWDICT(cctx, count, FALSE);
failret:
if (*arg == NULL)