diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-02-06 18:36:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-06 18:36:53 +0000 |
commit | 5f4ef5f5e5529c147c2274cd0f6416e2546d6fc7 (patch) | |
tree | dbcf399d3abbf0c263598de89be4f49ff463c1ff /src/testdir/test_vim9_builtin.vim | |
parent | 107f7325f615a1ffa5b49521e316b44e117b0a04 (diff) |
patch 8.2.4313: Vim9: cannot change type of list after making a slicev8.2.4313
Problem: Vim9: cannot change type of list after making a slice.
Solution: Adjust the declared member type. (closes #9696)
Diffstat (limited to 'src/testdir/test_vim9_builtin.vim')
-rw-r--r-- | src/testdir/test_vim9_builtin.vim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim index ee32b3989c..3ad6e0e62d 100644 --- 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)) |