Problem: Vim9: compilation fails when using dict member when skipping.
Solution: Do not generate ISN_USEDICT when skipping. (closes #10433)
g:vals = []
assert_equal(false, g:Record(1) && g:Record(true) && g:Record(0))
assert_equal([1, true, 0], g:vals)
+
+ var failed = false
+ if false && g:a == g:b.c
+ failed = true
+ endif
+ assert_false(failed)
END
v9.CheckDefAndScriptSuccess(lines)
enddef
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4972,
/**/
4971,
/**/
// Turn "dict.Func" into a partial for "Func" bound to "dict".
// This needs to be done at runtime to be able to check the type.
- if (keeping_dict && generate_instr(cctx, ISN_USEDICT) == NULL)
+ if (keeping_dict && cctx->ctx_skip != SKIP_YES
+ && generate_instr(cctx, ISN_USEDICT) == NULL)
return FAIL;
return OK;