summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-06 21:06:30 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-06 21:06:30 +0200
commitb68b346e6db6d3f848e0a89905fcd7777b73c5d8 (patch)
tree566601b221f3af448beea080d27dc3772c027b9e /src/eval.c
parent54ed0dff2913f9c973f6ab04b3c96372bdf07406 (diff)
patch 8.2.0703: Vim9: closure cannot store value in outer contextv8.2.0703
Problem: Vim9: closure cannot store value in outer context. Solution: Make storing value in outer context work. Make :disassemble accept a function reference.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index 72cb0897af..b7003a882c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -4337,9 +4337,11 @@ set_ref_in_item(
partial_T *pt = tv->vval.v_partial;
int i;
- // A partial does not have a copyID, because it cannot contain itself.
- if (pt != NULL)
+ if (pt != NULL && pt->pt_copyID != copyID)
{
+ // Didn't see this partial yet.
+ pt->pt_copyID = copyID;
+
abort = set_ref_in_func(pt->pt_name, pt->pt_func, copyID);
if (pt->pt_dict != NULL)