comparison src/vim9compile.c @ 20140:39a18a0df429 v8.2.0625

patch 8.2.0625: Vim9: confusing error when calling unknown function Commit: https://github.com/vim/vim/commit/1df8b3fb04ce8732a0be680273c95eb4e9f5e85d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 23 18:13:23 2020 +0200 patch 8.2.0625: Vim9: confusing error when calling unknown function Problem: Vim9: confusing error when calling unknown function. Solution: Give error while compiling.
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Apr 2020 18:15:04 +0200
parents d0a9766167ab
children fe8d0a4344df
comparison
equal deleted inserted replaced
20139:92f2b807c515 20140:39a18a0df429
2461 { 2461 {
2462 res = generate_PCALL(cctx, argcount, FALSE); 2462 res = generate_PCALL(cctx, argcount, FALSE);
2463 goto theend; 2463 goto theend;
2464 } 2464 }
2465 2465
2466 // The function may be defined only later. Need to figure out at runtime. 2466 // A global function may be defined only later. Need to figure out at
2467 res = generate_UCALL(cctx, name, argcount); 2467 // runtime.
2468 if (STRNCMP(namebuf, "g:", 2) == 0)
2469 res = generate_UCALL(cctx, name, argcount);
2470 else
2471 semsg(_(e_unknownfunc), namebuf);
2468 2472
2469 theend: 2473 theend:
2470 vim_free(tofree); 2474 vim_free(tofree);
2471 return res; 2475 return res;
2472 } 2476 }