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:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user