patch 8.2.2501: not always clear where an error is reported
Problem: Not always clear where an error is reported.
Solution: Add the where_T structure and pass it around. (closes #7796)
diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim
index 55beffa..7599df2 100644
--- a/src/testdir/test_vim9_assign.vim
+++ b/src/testdir/test_vim9_assign.vim
@@ -284,6 +284,14 @@
[v1, v2] = ''
END
CheckDefFailure(lines, 'E1012: Type mismatch; expected list<any> but got string', 3)
+
+ lines =<< trim END
+ g:values = [false, 0]
+ var x: bool
+ var y: string
+ [x, y] = g:values
+ END
+ CheckDefExecAndScriptFailure(lines, 'E1163: Variable 2: type mismatch, expected string but got number')
enddef
def Test_assign_linebreak()