diff src/vim9.h @ 31758:85f93e094810 v9.0.1211

patch 9.0.1211: storing value in interface member does not always work Commit: https://github.com/vim/vim/commit/f7d1c6e1884c76680980571f1cf15e0928d247b5 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 16 20:47:57 2023 +0000 patch 9.0.1211: storing value in interface member does not always work Problem: Storing value in interface member does not always work. Solution: Convert the index on the interface to the index on the object.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Jan 2023 22:00:03 +0100
parents 48431422f766
children 5ce5d78afcc9
line wrap: on
line diff
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -78,8 +78,8 @@ typedef enum {
     // ISN_STOREOTHER, // pop into other script variable isn_arg.other.
 
     ISN_STORENR,    // store number into local variable isn_arg.storenr.stnr_idx
-    ISN_STOREINDEX,	// store into list or dictionary, type isn_arg.vartype,
-			// value/index/variable on stack
+    ISN_STOREINDEX,	// store into list or dictionary, using
+			// isn_arg.storeindex; value/index/variable on stack
     ISN_STORERANGE,	// store into blob,
 			// value/index 1/index 2/variable on stack
 
@@ -486,6 +486,11 @@ typedef struct {
     class_T	*cm_class;
     int		cm_idx;
 } classmember_T;
+// arguments to ISN_STOREINDEX
+typedef struct {
+    vartype_T	si_vartype;
+    class_T	*si_class;
+} storeindex_T;
 
 /*
  * Instruction
@@ -540,6 +545,7 @@ struct isn_S {
 	echowin_T	    echowin;
 	construct_T	    construct;
 	classmember_T	    classmember;
+	storeindex_T	    storeindex;
     } isn_arg;
 };