mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.4311: Vim9: changing script variable type not caught compile time
Problem: Vim9: changing script variable type not caught at compile time. Solution: Set the declared type.
This commit is contained in:
@@ -692,6 +692,16 @@ def Test_extend_list()
|
||||
END
|
||||
v9.CheckDefExecAndScriptFailure(lines, 'E1013: Argument 2: type mismatch, expected list<number> but got list<string>', 4)
|
||||
unlet g:myList
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
var lds = [1, 2, 3]
|
||||
def Func()
|
||||
echo lds->extend(['x'])
|
||||
enddef
|
||||
defcompile
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1013:')
|
||||
enddef
|
||||
|
||||
def Test_extend_dict()
|
||||
|
Reference in New Issue
Block a user