Mercurial > vim
comparison src/vim9compile.c @ 20945:0653b9b72091 v8.2.1024
patch 8.2.1024: Vim9: no error for using "let g:var = val"
Commit: https://github.com/vim/vim/commit/6797966dfc0219313886be55767e53d5a388b5c5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 20 22:50:47 2020 +0200
patch 8.2.1024: Vim9: no error for using "let g:var = val"
Problem: Vim9: no error for using "let g:var = val".
Solution: Add an error.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Jun 2020 23:00:04 +0200 |
parents | 1693ca876049 |
children | 62912ad41aff |
comparison
equal
deleted
inserted
replaced
20944:75df4be5ecd8 | 20945:0653b9b72091 |
---|---|
4869 else if (STRNCMP(var_start, "g:", 2) == 0) | 4869 else if (STRNCMP(var_start, "g:", 2) == 0) |
4870 { | 4870 { |
4871 dest = dest_global; | 4871 dest = dest_global; |
4872 if (is_decl) | 4872 if (is_decl) |
4873 { | 4873 { |
4874 semsg(_("E1016: Cannot declare a global variable: %s"), | 4874 semsg(_(e_declare_global), name); |
4875 name); | |
4876 goto theend; | 4875 goto theend; |
4877 } | 4876 } |
4878 } | 4877 } |
4879 else if (STRNCMP(var_start, "b:", 2) == 0) | 4878 else if (STRNCMP(var_start, "b:", 2) == 0) |
4880 { | 4879 { |