diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-02 20:44:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-02 20:44:07 +0200 |
commit | c36350bca3eed8ef97061e28c38b5b89cae1f13e (patch) | |
tree | 0dc30d2da4cab8f05a58583e9044ca594c463da1 /src/testdir | |
parent | 934470e562df7bc778ff916db44918f3ccecc7cc (diff) |
patch 8.1.1964: crash when using nested map() and filter()v8.1.1964
Problem: Crash when using nested map() and filter().
Solution: Do not set the v:key type to string without clearing the pointer.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_filter_map.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/test_filter_map.vim b/src/testdir/test_filter_map.vim index 1dd3a5b29f..72a8d841e9 100644 --- a/src/testdir/test_filter_map.vim +++ b/src/testdir/test_filter_map.vim @@ -53,6 +53,12 @@ func Test_filter_map_list_expr_funcref() call assert_equal([0, 2, 4, 6], map([1, 2, 3, 4], function('s:filter4'))) endfunc +func Test_filter_map_nested() + let x = {"x":10} + let r = map(range(2), 'filter(copy(x), "1")') + call assert_equal([x, x], r) +endfunc + " dict with funcref func Test_filter_map_dict_expr_funcref() let dict = {"foo": 1, "bar": 2, "baz": 3} |