0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4972: Vim9: compilation fails when using dict member when skipping

Problem:    Vim9: compilation fails when using dict member when skipping.
Solution:   Do not generate ISN_USEDICT when skipping. (closes #10433)
This commit is contained in:
Bram Moolenaar
2022-05-17 15:03:33 +01:00
parent 40c141d333
commit 1ff9c44267
3 changed files with 10 additions and 1 deletions

View File

@@ -2102,7 +2102,8 @@ compile_subscript(
// 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;