patch 8.2.1734: Vim9: cannot use a funcref for a closure twice
Problem: Vim9: cannot use a funcref for a closure twice.
Solution: Instead of putting the funcref on the stack use a growarray on the
execution context.
diff --git a/src/vim9.h b/src/vim9.h
index b3d5bc2..a39fbbb 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -244,7 +244,6 @@
// arguments to ISN_FUNCREF
typedef struct {
int fr_func; // function index
- int fr_var_idx; // variable to store partial
} funcref_T;
// arguments to ISN_NEWFUNC
@@ -323,7 +322,7 @@
int df_instr_count;
int df_varcount; // number of local variables
- int df_closure_count; // number of closures created
+ int df_has_closure; // one if a closure was created
};
// Number of entries used by stack frame for a function call.