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

patch 8.2.1272: Vim9: type not checked if declaration also assigns value

Problem:    Vim9: type not checked if declaration also assigns value.
Solution:   Check the type. (issue #6507)
This commit is contained in:
Bram Moolenaar
2020-07-22 21:45:14 +02:00
parent 0f60e80f9b
commit 4cdb13ce81
7 changed files with 105 additions and 74 deletions

View File

@@ -29,6 +29,9 @@ def Test_assignment()
call CheckDefFailure(['let x:string = "x"'], 'E1069:')
call CheckDefFailure(['let a:string = "x"'], 'E1069:')
let nr: number = 1234
call CheckDefFailure(['let nr: number = "asdf"'], 'E1013:')
let a: number = 6 #comment
assert_equal(6, a)