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

patch 8.2.1952: Vim9: crash when using a NULL dict key

Problem:    Vim9: crash when using a NULL dict key.
Solution:   Use a NULL dict key like an empty string. (closes #7249)
This commit is contained in:
Bram Moolenaar
2020-11-04 13:38:28 +01:00
parent 64ffa9b5fb
commit c7f7f6db3e
3 changed files with 10 additions and 3 deletions

View File

@@ -1902,6 +1902,8 @@ def Test_expr7_dict()
var dictdict: dict<dict<string>> = #{one: #{a: 'text'}, two: #{}}
dictdict = #{one: #{}, two: #{a: 'text'}}
dictdict = #{one: #{}, two: #{}}
assert_equal({'': 0}, {matchstr('string', 'wont match'): 0})
CheckDefFailure(["var x = #{a:8}"], 'E1069:', 1)
CheckDefFailure(["var x = #{a : 8}"], 'E1068:', 1)