Mercurial > vim
comparison src/vim9compile.c @ 27669:5c4ab8d4472c v8.2.4360
patch 8.2.4360: Vim9: allowing use of "s:" leads to inconsistencies
Commit: https://github.com/vim/vim/commit/a749a42ed25534c88c636e5ab6603f1f97b857a4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 12 19:52:25 2022 +0000
patch 8.2.4360: Vim9: allowing use of "s:" leads to inconsistencies
Problem: Vim9: allowing use of "s:" leads to inconsistencies.
Solution: Disallow using "s:" in Vim9 script at the script level.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 12 Feb 2022 21:00:03 +0100 |
parents | 42d0279c6e7c |
children | 78d4f843521a |
comparison
equal
deleted
inserted
replaced
27668:407a08328369 | 27669:5c4ab8d4472c |
---|---|
1392 + (lhs->lhs_name[1] == ':' ? 2 : 0); | 1392 + (lhs->lhs_name[1] == ':' ? 2 : 0); |
1393 | 1393 |
1394 if (is_decl) | 1394 if (is_decl) |
1395 { | 1395 { |
1396 if (script_namespace) | 1396 if (script_namespace) |
1397 semsg(_(e_cannot_declare_script_variable_in_function), | 1397 semsg(_(e_cannot_declare_script_variable_in_function_str), |
1398 lhs->lhs_name); | 1398 lhs->lhs_name); |
1399 else | 1399 else |
1400 semsg(_(e_variable_already_declared_in_script_str), | 1400 semsg(_(e_variable_already_declared_in_script_str), |
1401 lhs->lhs_name); | 1401 lhs->lhs_name); |
1402 return FAIL; | 1402 return FAIL; |