comparison src/eval.c @ 20295:bc2c9ea94ec1 v8.2.0703

patch 8.2.0703: Vim9: closure cannot store value in outer context Commit: https://github.com/vim/vim/commit/b68b346e6db6d3f848e0a89905fcd7777b73c5d8 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 6 21:06:30 2020 +0200 patch 8.2.0703: Vim9: closure cannot store value in outer context Problem: Vim9: closure cannot store value in outer context. Solution: Make storing value in outer context work. Make :disassemble accept a function reference.
author Bram Moolenaar <Bram@vim.org>
date Wed, 06 May 2020 21:15:04 +0200
parents 683c2da4982b
children 4c317d8c1051
comparison
equal deleted inserted replaced
20294:cefbaab2e368 20295:bc2c9ea94ec1
4335 else if (tv->v_type == VAR_PARTIAL) 4335 else if (tv->v_type == VAR_PARTIAL)
4336 { 4336 {
4337 partial_T *pt = tv->vval.v_partial; 4337 partial_T *pt = tv->vval.v_partial;
4338 int i; 4338 int i;
4339 4339
4340 // A partial does not have a copyID, because it cannot contain itself. 4340 if (pt != NULL && pt->pt_copyID != copyID)
4341 if (pt != NULL) 4341 {
4342 { 4342 // Didn't see this partial yet.
4343 pt->pt_copyID = copyID;
4344
4343 abort = set_ref_in_func(pt->pt_name, pt->pt_func, copyID); 4345 abort = set_ref_in_func(pt->pt_name, pt->pt_func, copyID);
4344 4346
4345 if (pt->pt_dict != NULL) 4347 if (pt->pt_dict != NULL)
4346 { 4348 {
4347 typval_T dtv; 4349 typval_T dtv;