]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1942: Vim9: Assignment to read-only registers @: and @% is allowed v9.1.1942
authorDoug Kearns <dougkearns@gmail.com>
Sun, 30 Nov 2025 15:26:22 +0000 (15:26 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 30 Nov 2025 15:26:22 +0000 (15:26 +0000)
commite5c5378cd27a7a370af7868ec1e4d005b335b2f9
tree43fadce9784b6ad140bedb24576a6c922063a670
parent791478b30ae48f14e297b4f79dc49380ace99fac
patch 9.1.1942: Vim9: Assignment to read-only registers @: and @% is allowed

Problem:  Assignment to read-only registers @: and @% is allowed during
          compilation.
Solution: Abort compilation and emit an E354 error when assigning to
          these registers (Doug Kearns).

Fix the E354 error emitted when attempting to declare @: with :var so
that it references the correct register, @:,  rather than the garbage
string "^@".

closes: #18806

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_vim9_assign.vim
src/testdir/test_vim9_expr.vim
src/version.c
src/vim9compile.c