summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 72387610d..fa73de23d 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2720,11 +2720,17 @@ compile_load_scriptvar(
cctx, TRUE);
*p = cc;
p = skipwhite(p);
+ *end = p;
- // TODO: what if it is a function?
if (idx < 0)
+ {
+ if (*p == '(' && ufunc != NULL)
+ {
+ generate_PUSHFUNC(cctx, ufunc->uf_name, import->imp_type);
+ return OK;
+ }
return FAIL;
- *end = p;
+ }
generate_VIM9SCRIPT(cctx, ISN_LOADSCRIPT,
import->imp_sid,