summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-27 15:19:27 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-27 15:19:27 +0200
commitcfcd011fcd8021da52fba62dabf7a2497f1879b7 (patch)
tree4b15ba4d18a6901feb2e0863e150cb0b3302fba5 /src/vim9compile.c
parentc0e29010f68a0ebe439f9bd78493799c60b7bfd3 (diff)
downloadvim-git-cfcd011fcd8021da52fba62dabf7a2497f1879b7.tar.gz
patch 8.2.1756: Vim9: :let will soon be disallowedv8.2.1756
Problem: Vim9: :let will soon be disallowed. Solution: Add v:disallow_let temporarily. Fix tests.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 832d7d93e..d505ca670 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -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: