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

patch 8.2.2395: Vim9: error for wrong type may report wrong line number

Problem:    Vim9: error for wrong type may report wrong line number.
Solution:   Save and restore the line number when evaluating the expression.
            (closes #7727)
This commit is contained in:
Bram Moolenaar
2021-01-23 13:39:14 +01:00
parent 9ae3705b6e
commit 9a562c184d
3 changed files with 11 additions and 0 deletions

View File

@@ -55,6 +55,8 @@ def Test_assignment_bool()
CheckDefAndScriptFailure(['var x: bool = [1]'], 'E1012:')
CheckDefAndScriptFailure(['var x: bool = {}'], 'E1012:')
CheckDefAndScriptFailure(['var x: bool = "x"'], 'E1012:')
CheckDefAndScriptFailure(['var x: bool = "x"', '', 'eval 0'], 'E1012:', 1)
enddef
def Test_syntax()