mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 16:42:42 +00:00
vim-patch:8.2.3338: Vim9: no type check when assigning a list range
Problem: Vim9: no type check when assigning a list range. (Naohiro Ono)
Solution: Check the member type. (closes vim/vim#8750)
89071cb6a1
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -186,6 +186,12 @@ func Test_list_range_assign()
|
||||
call assert_equal([5, 6], l)
|
||||
END
|
||||
call CheckLegacyAndVim9Success(lines)
|
||||
|
||||
let lines =<< trim END
|
||||
var l = [7]
|
||||
l[:] = ['text']
|
||||
END
|
||||
call CheckDefAndScriptFailure(lines, 'E1012:', 2)
|
||||
endfunc
|
||||
|
||||
" Test removing items in list
|
||||
|
||||
Reference in New Issue
Block a user