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

patch 8.2.2705: Vim9: misleading reported line number for wrong type

Problem:    Vim9: misleading reported line number for wrong type.
Solution:   Remember and use the line number at the start. (closes #8059)
This commit is contained in:
Bram Moolenaar
2021-04-03 21:01:01 +02:00
parent 440cf096fa
commit 77709b194c
3 changed files with 14 additions and 1 deletions

View File

@@ -315,6 +315,14 @@ def Test_assign_linebreak()
assert_equal(34, n2)
CheckDefFailure(["var x = #"], 'E1097:', 3)
var lines =<< trim END
var x: list<string> = ['a']
var y: list<number> = x
->copy()
->copy()
END
CheckDefFailure(lines, 'E1012:', 2)
enddef
def Test_assign_index()