mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.0625: Vim9: confusing error when calling unknown function
Problem: Vim9: confusing error when calling unknown function. Solution: Give error while compiling.
This commit is contained in:
@@ -2463,8 +2463,12 @@ compile_call(char_u **arg, size_t varlen, cctx_T *cctx, int argcount_init)
|
||||
goto theend;
|
||||
}
|
||||
|
||||
// The function may be defined only later. Need to figure out at runtime.
|
||||
res = generate_UCALL(cctx, name, argcount);
|
||||
// A global function may be defined only later. Need to figure out at
|
||||
// runtime.
|
||||
if (STRNCMP(namebuf, "g:", 2) == 0)
|
||||
res = generate_UCALL(cctx, name, argcount);
|
||||
else
|
||||
semsg(_(e_unknownfunc), namebuf);
|
||||
|
||||
theend:
|
||||
vim_free(tofree);
|
||||
|
Reference in New Issue
Block a user