comparison src/testdir/test_vim9_assign.vim @ 23917:4b417b776b95 v8.2.2501

patch 8.2.2501: not always clear where an error is reported Commit: https://github.com/vim/vim/commit/f785aa1354208f6b644e891aa01f8f86d947af7e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 11 21:19:34 2021 +0100 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 https://github.com/vim/vim/issues/7796)
author Bram Moolenaar <Bram@vim.org>
date Thu, 11 Feb 2021 21:30:04 +0100
parents 6e8a4a30d94d
children ba79ceac82ec
comparison
equal deleted inserted replaced
23916:cdb1a04f8189 23917:4b417b776b95
282 var v1: number 282 var v1: number
283 var v2: number 283 var v2: number
284 [v1, v2] = '' 284 [v1, v2] = ''
285 END 285 END
286 CheckDefFailure(lines, 'E1012: Type mismatch; expected list<any> but got string', 3) 286 CheckDefFailure(lines, 'E1012: Type mismatch; expected list<any> but got string', 3)
287
288 lines =<< trim END
289 g:values = [false, 0]
290 var x: bool
291 var y: string
292 [x, y] = g:values
293 END
294 CheckDefExecAndScriptFailure(lines, 'E1163: Variable 2: type mismatch, expected string but got number')
287 enddef 295 enddef
288 296
289 def Test_assign_linebreak() 297 def Test_assign_linebreak()
290 var nr: number 298 var nr: number
291 nr = 299 nr =