patch 8.2.4973: Vim9: type error for list unpack mentions argument
Problem: Vim9: type error for list unpack mentions argument.
Solution: Mention variable. (close #10435)
diff --git a/src/vim9instr.c b/src/vim9instr.c
index edc5db0..3a8d695 100644
--- a/src/vim9instr.c
+++ b/src/vim9instr.c
@@ -542,6 +542,7 @@
cctx_T *cctx,
type_T *expected,
int offset,
+ int is_var,
int argidx)
{
isn_T *isn;
@@ -551,6 +552,7 @@
return FAIL;
isn->isn_arg.type.ct_type = alloc_type(expected);
isn->isn_arg.type.ct_off = (int8_T)offset;
+ isn->isn_arg.type.ct_is_var = is_var;
isn->isn_arg.type.ct_arg_idx = (int8_T)argidx;
// type becomes expected
@@ -1437,7 +1439,7 @@
if (maptype != NULL && maptype[0].type_decl->tt_member != NULL
&& maptype[0].type_decl->tt_member != &t_any)
// Check that map() didn't change the item types.
- generate_TYPECHECK(cctx, maptype[0].type_decl, -1, 1);
+ generate_TYPECHECK(cctx, maptype[0].type_decl, -1, FALSE, 1);
return OK;
}