]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.0.0470: in :def function all closures in loop get the same variables v9.0.0470
authorBram Moolenaar <Bram@vim.org>
Thu, 15 Sep 2022 16:19:37 +0000 (17:19 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 15 Sep 2022 16:19:37 +0000 (17:19 +0100)
commitb46c083a5ed9e0c4ac5f3aec577946dcbe8c9dc5
treef91c0168ac87183c5df558840b9cf920d18df558
parent3735f11050616652525bf80b4fbcb2b3bfeab113
patch 9.0.0470: in :def function all closures in loop get the same variables

Problem:    In a :def function all closures in a loop get the same variables.
Solution:   When in a loop and a closure refers to a variable declared in the
            loop, prepare for making a copy of variables for each closure.
src/proto/vim9instr.pro
src/testdir/test_vim9_disassemble.vim
src/version.c
src/vim9.h
src/vim9cmds.c
src/vim9compile.c
src/vim9execute.c
src/vim9instr.c