Mercurial > vim
comparison src/userfunc.c @ 21646:a640bc762196 v8.2.1373
patch 8.2.1373: Vim9: no error for assigning to non-existing script var
Commit: https://github.com/vim/vim/commit/f9b2b49663226235f94f08230fe9023caf80a6e9
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 5 14:34:14 2020 +0200
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 https://github.com/vim/vim/issues/6630)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 05 Aug 2020 14:45:03 +0200 |
parents | 7b5b9558500a |
children | 26a4b53c4587 |
comparison
equal
deleted
inserted
replaced
21645:5c2e5c71c08c | 21646:a640bc762196 |
---|---|
3506 flags |= FC_VIM9; | 3506 flags |= FC_VIM9; |
3507 fp->uf_flags = flags; | 3507 fp->uf_flags = flags; |
3508 fp->uf_calls = 0; | 3508 fp->uf_calls = 0; |
3509 fp->uf_cleared = FALSE; | 3509 fp->uf_cleared = FALSE; |
3510 fp->uf_script_ctx = current_sctx; | 3510 fp->uf_script_ctx = current_sctx; |
3511 fp->uf_script_ctx_version = current_sctx.sc_version; | |
3511 fp->uf_script_ctx.sc_lnum += sourcing_lnum_top; | 3512 fp->uf_script_ctx.sc_lnum += sourcing_lnum_top; |
3512 if (is_export) | 3513 if (is_export) |
3513 { | 3514 { |
3514 fp->uf_flags |= FC_EXPORT; | 3515 fp->uf_flags |= FC_EXPORT; |
3515 // let ex_export() know the export worked. | 3516 // let ex_export() know the export worked. |