patch 8.2.3029: Vim9: crash when using operator and list unpack assignment
Problem: Vim9: crash when using operator and list unpack assignment.
(Naohiro Ono)
Solution: Get variable value before operation. (closes #8416)
diff --git a/src/vim9.h b/src/vim9.h
index 97e2132..58d451c 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -209,6 +209,12 @@
int cuf_argcount; // number of arguments on top of stack
} cufunc_T;
+// arguments to ISN_GETITEM
+typedef struct {
+ varnumber_T gi_index;
+ int gi_with_op;
+} getitem_T;
+
typedef enum {
JUMP_ALWAYS,
JUMP_IF_FALSE, // pop and jump if false
@@ -432,6 +438,7 @@
isn_T *instr;
tostring_T tostring;
tobool_T tobool;
+ getitem_T getitem;
} isn_arg;
};