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)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index a3bb411..0f002f9 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1068,7 +1068,7 @@
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);
}