0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1434: Vim9: crash when lambda uses outer function argument

Problem:    Vim9: crash when lambda uses outer function argument.
Solution:   Set the flag that the outer context is used.
This commit is contained in:
Bram Moolenaar
2020-08-12 19:42:01 +02:00
parent ba60cc45e7
commit fd77748df2
3 changed files with 18 additions and 0 deletions

View File

@@ -2135,7 +2135,10 @@ compile_load(char_u **arg, char_u *end_arg, cctx_T *cctx, int error)
if (gen_load)
res = generate_LOAD(cctx, ISN_LOAD, idx, NULL, type);
if (gen_load_outer)
{
res = generate_LOAD(cctx, ISN_LOADOUTER, idx, NULL, type);
cctx->ctx_outer_used = TRUE;
}
}
*arg = end;