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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user