Mercurial > vim
diff src/vim9compile.c @ 21769:f37c1330b15c v8.2.1434
patch 8.2.1434: Vim9: crash when lambda uses outer function argument
Commit: https://github.com/vim/vim/commit/fd77748df2ba7d5f38aab649cb630374620462d7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 12 19:42:01 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Aug 2020 19:45:04 +0200 |
parents | 9529a2367d3e |
children | fcf978444298 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -2135,7 +2135,10 @@ compile_load(char_u **arg, char_u *end_a 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;