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:
@@ -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:')
|
||||
|
||||
|
Reference in New Issue
Block a user