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

patch 8.2.0973: Vim9: type is not checked when assigning to a script variable

Problem:    Vim9: type is not checked when assigning to a script variable.
Solution:   Check the type.
This commit is contained in:
Bram Moolenaar
2020-06-13 19:00:10 +02:00
parent c82a5b5da5
commit 34db91f7a4
7 changed files with 51 additions and 8 deletions

View File

@@ -1831,6 +1831,15 @@ def Test_let_declaration()
unlet g:var_test
enddef
def Test_let_type_check()
let lines =<< trim END
vim9script
let var: string
var = 1234
END
CheckScriptFailure(lines, 'E1013:')
enddef
def Test_forward_declaration()
let lines =<< trim END
vim9script