summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-14 22:28:30 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-14 22:28:30 +0200
commit71abe4828974af495602ffaff63cf643a16de84b (patch)
treee1a6a8abda66aedec5511890c79d0e587ce0f98e /src/vim9compile.c
parent0b4c66c67a083f25816b9cdb8e76a41e02d9f560 (diff)
downloadvim-git-71abe4828974af495602ffaff63cf643a16de84b.tar.gz
patch 8.2.1686: Vim9: "const!" not sufficiently testedv8.2.1686
Problem: Vim9: "const!" not sufficiently tested. Solution: Add a few more test cases. Fix type checking.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 103e696bf..e8a3a21db 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -5066,12 +5066,13 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
{
type_T *use_type = lvar->lv_type;
- // without operator type is here, otherwise below
+ // without operator check type here, otherwise below
if (has_index)
{
use_type = use_type->tt_member;
if (use_type == NULL)
- use_type = &t_void;
+ // could be indexing "any"
+ use_type = &t_any;
}
if (need_type(stacktype, use_type, -1, cctx, FALSE)
== FAIL)