Mercurial > vim
comparison src/testdir/test_vim9_cmd.vim @ 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 | df84fac1e9a4 |
children | 1646525507aa |
comparison
equal
deleted
inserted
replaced
27668:407a08328369 | 27669:5c4ab8d4472c |
---|---|
1716 v9.CheckDefAndScriptFailure(lines, ['E1001: Variable not found: g', 'E121: Undefined variable: g'], 1) | 1716 v9.CheckDefAndScriptFailure(lines, ['E1001: Variable not found: g', 'E121: Undefined variable: g'], 1) |
1717 | 1717 |
1718 lines =<< trim END | 1718 lines =<< trim END |
1719 s:notexist:repl | 1719 s:notexist:repl |
1720 END | 1720 END |
1721 v9.CheckDefAndScriptFailure(lines, ['E488: Trailing characters: :repl', 'E121: Undefined variable: s:notexist'], 1) | 1721 v9.CheckDefAndScriptFailure(lines, ['E488: Trailing characters: :repl', 'E1268:'], 1) |
1722 | |
1723 lines =<< trim END | |
1724 notexist:repl | |
1725 END | |
1726 v9.CheckDefAndScriptFailure(lines, ['E476:', 'E492:'], 1) | |
1722 | 1727 |
1723 lines =<< trim END | 1728 lines =<< trim END |
1724 s-pat-repl | 1729 s-pat-repl |
1725 END | 1730 END |
1726 v9.CheckDefAndScriptFailure(lines, 'E1241:', 1) | 1731 v9.CheckDefAndScriptFailure(lines, 'E1241:', 1) |