patch 8.2.2170: Vim9: a global function defined in a :def function fails
Problem: Vim9: a global function defined in a :def function fails if it
uses the context.
Solution: Create a partial to store the closure context. (see #7410)
diff --git a/src/structs.h b/src/structs.h
index 631881f..809a2d1 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1598,6 +1598,9 @@
garray_T uf_type_list; // types used in arg and return types
int *uf_def_arg_idx; // instruction indexes for evaluating
// uf_def_args; length: uf_def_args.ga_len + 1
+ partial_T *uf_partial; // for closure created inside :def function:
+ // information about the context
+
char_u *uf_va_name; // name from "...name" or NULL
type_T *uf_va_type; // type from "...name: type" or NULL
type_T *uf_func_type; // type of the function, &t_func_any if unknown