patch 8.2.0818: Vim9: using a discovery phase doesn't work well
Problem: Vim9: using a discovery phase doesn't work well.
Solution: Remove the discovery phase, instead compile a function only when
it is used. Add :defcompile to compile def functions earlier.
diff --git a/src/eval.c b/src/eval.c
index 00b6c59..d76ec94 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -244,7 +244,8 @@
if (partial == NULL)
return FAIL;
- if (partial->pt_func != NULL && partial->pt_func->uf_dfunc_idx >= 0)
+ if (partial->pt_func != NULL
+ && partial->pt_func->uf_dfunc_idx != UF_NOT_COMPILED)
{
if (call_def_function(partial->pt_func, argc, argv,
partial, rettv) == FAIL)