0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1373: Vim9: no error for assigning to non-existing script var

Problem:    Vim9: no error for assigning to non-existing script var.
Solution:   Check that in Vim9 script the variable was defined. (closes #6630)
This commit is contained in:
Bram Moolenaar
2020-08-05 14:34:14 +02:00
parent fdac71c507
commit f9b2b49663
5 changed files with 68 additions and 36 deletions

View File

@@ -3508,6 +3508,7 @@ def_function(exarg_T *eap, char_u *name_arg)
fp->uf_calls = 0;
fp->uf_cleared = FALSE;
fp->uf_script_ctx = current_sctx;
fp->uf_script_ctx_version = current_sctx.sc_version;
fp->uf_script_ctx.sc_lnum += sourcing_lnum_top;
if (is_export)
{