0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.2252: Vim9: crash when using lambda without return type in dict

Problem:    Vim9: crash when using lambda without return type in dict.
Solution:   Without a return type use t_unknown. (closes #7587)
This commit is contained in:
Bram Moolenaar
2020-12-31 13:31:23 +01:00
parent a04d447d3a
commit 6b55377303
4 changed files with 12 additions and 2 deletions

View File

@@ -2077,6 +2077,10 @@ def Test_expr7_dict()
assert_equal(g:test_hash_dict, {one: 1, two: 2})
assert_equal({['a a']: 1, ['b/c']: 2}, {'a a': 1, "b/c": 2})
var d = {a: () => 3, b: () => 7}
assert_equal(3, d.a())
assert_equal(7, d.b())
END
CheckDefAndScriptSuccess(lines)