Problem: Vim9: type error after storing an option value.
Solution: Drop the type after a STOREOPT instruction. (closes #6632)
assert_equal('one', v1)
assert_equal('two', v2)
assert_equal(['three'], vrem)
+
+ [&ts, &sw] = [3, 4]
+ assert_equal(3, &ts)
+ assert_equal(4, &sw)
+ set ts=8 sw=4
enddef
def Test_assignment_vim9script()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1390,
/**/
1389,
/**/
isn_T *isn;
RETURN_OK_IF_SKIP(cctx);
- if ((isn = generate_instr(cctx, ISN_STOREOPT)) == NULL)
+ if ((isn = generate_instr_drop(cctx, ISN_STOREOPT, 1)) == NULL)
return FAIL;
isn->isn_arg.storeopt.so_name = vim_strsave(name);
isn->isn_arg.storeopt.so_flags = opt_flags;