Mercurial > vim
diff src/testdir/test_vim9_builtin.vim @ 27573:68eac9355e49 v8.2.4313
patch 8.2.4313: Vim9: cannot change type of list after making a slice
Commit: https://github.com/vim/vim/commit/5f4ef5f5e5529c147c2274cd0f6416e2546d6fc7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 6 18:36:53 2022 +0000
patch 8.2.4313: Vim9: cannot change type of list after making a slice
Problem: Vim9: cannot change type of list after making a slice.
Solution: Adjust the declared member type. (closes https://github.com/vim/vim/issues/9696)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Feb 2022 19:45:02 +0100 |
parents | 5bf2fca4f967 |
children | 5c4ab8d4472c |
line wrap: on
line diff
--- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -3626,6 +3626,7 @@ def Test_slice() var lds: list<dict<string>> = [{key: 'value'}] assert_equal(['val'], lds->slice(0, 1)->map((_, v) => 'val')) + assert_equal(['val'], lds[ : ]->map((_, v) => 'val')) assert_equal(0z1122334455, slice(0z001122334455, 1)) assert_equal(0z112233, slice(0z001122334455, 1, 4))