Mercurial > vim
diff src/testdir/test_listdict.vim @ 30425:6c2bbd7d9217 v9.0.0548
patch 9.0.0548: reduce() with a compiled lambda could be faster
Commit: https://github.com/vim/vim/commit/f1c60d4bf10794265b828afd9c5f7eddacada10b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 22 17:07:00 2022 +0100
patch 9.0.0548: reduce() with a compiled lambda could be faster
Problem: reduce() with a compiled lambda could be faster.
Solution: Call eval_expr_typval() instead of call_func() directly.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 22 Sep 2022 18:15:03 +0200 |
parents | 029c59bf78f1 |
children | 53af60596aba |
line wrap: on
line diff
--- a/src/testdir/test_listdict.vim +++ b/src/testdir/test_listdict.vim @@ -1045,7 +1045,7 @@ func Test_reduce() call assert_fails("call reduce({}, { acc, val -> acc + val }, 1)", 'E1098:') call assert_fails("call reduce(0, { acc, val -> acc + val }, 1)", 'E1098:') - call assert_fails("call reduce([1, 2], 'Xdoes_not_exist')", 'E117:') + call assert_fails("call reduce([1, 2], 'Xdoes_not_exist')", 'E121:') call assert_fails("echo reduce(0z01, { acc, val -> 2 * acc + val }, '')", 'E1210:') call assert_fails("vim9 reduce(0, (acc, val) => (acc .. val), '')", 'E1252:')