diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-03-27 16:29:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-27 16:29:53 +0100 |
commit | ec15b1cfdc5faadb529dedda58adf7fc98c839ed (patch) | |
tree | cdcf7ffa3e2ed7de3fc890f6415a0be84ad1e490 /src/vim9expr.c | |
parent | c75bca3ee955ff36ece99a42041733ddea5f45a7 (diff) | |
download | vim-git-ec15b1cfdc5faadb529dedda58adf7fc98c839ed.tar.gz |
patch 8.2.4634: Vim9: cannot initialize a variable to null_listv8.2.4634
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.
Diffstat (limited to 'src/vim9expr.c')
-rw-r--r-- | src/vim9expr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vim9expr.c b/src/vim9expr.c index 8c7d0b0e9..90d7c8cf4 100644 --- a/src/vim9expr.c +++ b/src/vim9expr.c @@ -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) |