0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1387: Vim9: cannot assign to single letter variable with type

Problem:    Vim9: cannot assign to single letter variable with type.
Solution:   Exclude the colon from the variable name. (closes #6647)
This commit is contained in:
Bram Moolenaar
2020-08-07 19:28:08 +02:00
parent 994b89d28d
commit 95dd9f2571
3 changed files with 28 additions and 6 deletions

View File

@@ -449,6 +449,17 @@ def Test_assignment_vim9script()
@+ = 'plus'
assert_equal('plus', @+)
endif
let a: number = 123
assert_equal(123, a)
let s: string = 'yes'
assert_equal('yes', s)
let b: number = 42
assert_equal(42, b)
let w: number = 43
assert_equal(43, w)
let t: number = 44
assert_equal(44, t)
END
CheckScriptSuccess(lines)
enddef