0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1756: Vim9: :let will soon be disallowed

Problem:    Vim9: :let will soon be disallowed.
Solution:   Add v:disallow_let temporarily.  Fix tests.
This commit is contained in:
Bram Moolenaar
2020-09-27 15:19:27 +02:00
parent c0e29010f6
commit cfcd011fcd
7 changed files with 237 additions and 210 deletions

View File

@@ -6979,6 +6979,12 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
break;
case CMD_let:
if (get_vim_var_nr(VV_DISALLOW_LET))
{
emsg(_(e_cannot_use_let_in_vim9_script));
break;
}
// FALLTHROUGH
case CMD_var:
case CMD_final:
case CMD_const: