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

patch 8.2.2771: Vim9: assignment not recognized if declaration was skipped

Problem:    Vim9: assignment not recognized if declaration was skipped.
Solution:   Also recognized an assignment if the variable does not exist.
            (closes #8108)
This commit is contained in:
Bram Moolenaar
2021-04-15 22:13:39 +02:00
parent fe090eb58f
commit aa1959bd5e
3 changed files with 17 additions and 1 deletions

View File

@@ -249,6 +249,18 @@ def Test_assignment()
END
enddef
def Test_skipped_assignment()
var lines =<< trim END
for x in []
var i: number = 1
while false
i += 1
endwhile
endfor
END
CheckDefAndScriptSuccess(lines)
enddef
def Test_assign_unpack()
var lines =<< trim END
var v1: number