Mercurial > vim
comparison src/vim9compile.c @ 22415:1cefe1c013ac v8.2.1756
patch 8.2.1756: Vim9: :let will soon be disallowed
Commit: https://github.com/vim/vim/commit/cfcd011fcd8021da52fba62dabf7a2497f1879b7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 27 15:19:27 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 27 Sep 2020 15:30:04 +0200 |
parents | 66d1131a7eff |
children | 5b35b477eff0 |
comparison
equal
deleted
inserted
replaced
22414:f22c7b159f37 | 22415:1cefe1c013ac |
---|---|
6977 line = compile_return(p, set_return_type, &cctx); | 6977 line = compile_return(p, set_return_type, &cctx); |
6978 cctx.ctx_had_return = TRUE; | 6978 cctx.ctx_had_return = TRUE; |
6979 break; | 6979 break; |
6980 | 6980 |
6981 case CMD_let: | 6981 case CMD_let: |
6982 if (get_vim_var_nr(VV_DISALLOW_LET)) | |
6983 { | |
6984 emsg(_(e_cannot_use_let_in_vim9_script)); | |
6985 break; | |
6986 } | |
6987 // FALLTHROUGH | |
6982 case CMD_var: | 6988 case CMD_var: |
6983 case CMD_final: | 6989 case CMD_final: |
6984 case CMD_const: | 6990 case CMD_const: |
6985 line = compile_assignment(p, &ea, ea.cmdidx, &cctx); | 6991 line = compile_assignment(p, &ea, ea.cmdidx, &cctx); |
6986 if (line == p) | 6992 if (line == p) |