patch 9.0.1140: cannot call an object method in a compiled function
Problem: Cannot call an object method in a compiled function.
Solution: Compile the instructins to invoke an object method.
diff --git a/src/vim9script.c b/src/vim9script.c
index 63eed4b..0af7bb6 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -1136,7 +1136,7 @@
&& !(STRCMP("this", name) == 0
&& cctx != NULL
&& cctx->ctx_ufunc != NULL
- && (cctx->ctx_ufunc->uf_flags & FC_OBJECT)))
+ && (cctx->ctx_ufunc->uf_flags & (FC_OBJECT|FC_NEW))))
{
semsg(_(e_cannot_use_reserved_name_str), name);
return FAIL;