comparison src/vim9compile.c @ 23996:c192411b27e8 v8.2.2540

patch 8.2.2540: Vim9: no error for using script var name for argument Commit: https://github.com/vim/vim/commit/b4893b84507570f24af32597716ffb67fb0ef24e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 21 22:20:24 2021 +0100 patch 8.2.2540: Vim9: no error for using script var name for argument Problem: Vim9: no error for using script var name for argument. Solution: Check for this error. (closes https://github.com/vim/vim/issues/7868)
author Bram Moolenaar <Bram@vim.org>
date Sun, 21 Feb 2021 22:30:05 +0100
parents 3daeb2060f25
children 308d29307910
comparison
equal deleted inserted replaced
23995:ac050d89a914 23996:c192411b27e8
335 * If "vim9script" is TRUE the script must be Vim9 script. Used for "var" 335 * If "vim9script" is TRUE the script must be Vim9 script. Used for "var"
336 * without "s:". 336 * without "s:".
337 * "cctx" is NULL at the script level. 337 * "cctx" is NULL at the script level.
338 * Returns OK or FAIL. 338 * Returns OK or FAIL.
339 */ 339 */
340 static int 340 int
341 script_var_exists(char_u *name, size_t len, int vim9script, cctx_T *cctx) 341 script_var_exists(char_u *name, size_t len, int vim9script, cctx_T *cctx)
342 { 342 {
343 int is_vim9_script; 343 int is_vim9_script;
344 344
345 if (current_sctx.sc_sid <= 0) 345 if (current_sctx.sc_sid <= 0)