0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.0981: Vim9: cannot compile "[var, var] = list"

Problem:    Vim9: cannot compile "[var, var] = list".
Solution:   Implement list assignment.
This commit is contained in:
Bram Moolenaar
2020-06-14 23:05:10 +02:00
parent a65d8b5bb9
commit 47a519a933
8 changed files with 770 additions and 587 deletions

View File

@@ -223,6 +223,14 @@ def Test_assignment_default()
assert_equal(5678, nr)
enddef
def Test_assignment_var_list()
let v1: string
let v2: string
[v1, v2] = ['one', 'two']
assert_equal('one', v1)
assert_equal('two', v2)
enddef
def Mess(): string
v:foldstart = 123
return 'xxx'