0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1292: :defer may call the wrong method for an object

Problem:    :defer may call the wrong method for an object. (Ernie Rael)
Solution:   When en object is from a class that extends or implements, figure
            out the method to call at runtime. (closes #11910)
This commit is contained in:
Bram Moolenaar
2023-02-08 20:55:27 +00:00
parent 6642982bea
commit 313e4724c3
8 changed files with 94 additions and 9 deletions

View File

@@ -1068,7 +1068,7 @@ compile_nested_function(exarg_T *eap, cctx_T *cctx, garray_T *lines_to_free)
ASSIGN_CONST, ufunc->uf_func_type);
if (lvar == NULL)
goto theend;
if (generate_FUNCREF(cctx, ufunc, &funcref_isn) == FAIL)
if (generate_FUNCREF(cctx, ufunc, NULL, 0, &funcref_isn) == FAIL)
goto theend;
r = generate_STORE(cctx, ISN_STORE, lvar->lv_idx, NULL);
}