0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.2682: Vim9: cannot find Name.Func from "import * as Name"

Problem:    Vim9: cannot find Name.Func from "import * as Name". (Alexander
            Goussas)
Solution:   When no variable found try finding a function. (closes #8045)
            Check that the function was exported.
This commit is contained in:
Bram Moolenaar
2021-04-01 12:57:57 +02:00
parent 12be734faf
commit 529fb5a5f6
4 changed files with 37 additions and 6 deletions

View File

@@ -2720,12 +2720,18 @@ compile_load_scriptvar(
cctx, TRUE);
*p = cc;
p = skipwhite(p);
// TODO: what if it is a function?
if (idx < 0)
return FAIL;
*end = p;
if (idx < 0)
{
if (*p == '(' && ufunc != NULL)
{
generate_PUSHFUNC(cctx, ufunc->uf_name, import->imp_type);
return OK;
}
return FAIL;
}
generate_VIM9SCRIPT(cctx, ISN_LOADSCRIPT,
import->imp_sid,
idx,