0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.2.2371: Vim9: crash when using types in :for with unpack

Problem:    Vim9: crash when using types in :for with unpack.
Solution:   Check for skip_var_list() failing. Pass include_type to
            skip_var_one(). Skip type when compiling. (closes #7694)
This commit is contained in:
Bram Moolenaar
2021-01-17 20:23:38 +01:00
parent 1430ceeb2d
commit 036d07144e
4 changed files with 19 additions and 4 deletions

View File

@@ -2060,6 +2060,12 @@ def Test_for_loop()
total += nr
endfor
assert_equal(6, total)
var res = ""
for [n: number, s: string] in [[1, 'a'], [2, 'b']]
res ..= n .. s
endfor
assert_equal('1a2b', res)
enddef
def Test_for_loop_fails()