0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.2618: Vim9: cannot use a normal list name to store function refs

Problem:    Vim9: cannot use a normal list name to store function refs.
Solution:   Allow a lower case name if it is indexed.
This commit is contained in:
Bram Moolenaar
2021-03-17 20:56:38 +01:00
parent 8863bda25d
commit 3f32788000
3 changed files with 14 additions and 2 deletions

View File

@@ -72,6 +72,13 @@ def Test_assignment()
CheckDefFailure(['var lambda = () => "lambda"'], 'E704:')
CheckScriptFailure(['var x = "x"'], 'E1124:')
# lower case name is OK for a list
var lambdaLines =<< trim END
var lambdaList: list<func> = [Test_syntax]
lambdaList[0] = () => "lambda"
END
CheckDefAndScriptSuccess(lambdaLines)
var nr: number = 1234
CheckDefFailure(['var nr: number = "asdf"'], 'E1012:')