Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 22808:96dbb61a54c2 v8.2.1952
patch 8.2.1952: Vim9: crash when using a NULL dict key
Commit: https://github.com/vim/vim/commit/c7f7f6db3e9d3b6b723ed17d5244c83859583832
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 4 13:38:28 2020 +0100
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 https://github.com/vim/vim/issues/7249)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 Nov 2020 13:45:05 +0100 |
parents | af26fadf333d |
children | b129f28b0e35 |
comparison
equal
deleted
inserted
replaced
22807:606ff2127ead | 22808:96dbb61a54c2 |
---|---|
1900 dictlist = #{absent: [], present: []} | 1900 dictlist = #{absent: [], present: []} |
1901 | 1901 |
1902 var dictdict: dict<dict<string>> = #{one: #{a: 'text'}, two: #{}} | 1902 var dictdict: dict<dict<string>> = #{one: #{a: 'text'}, two: #{}} |
1903 dictdict = #{one: #{}, two: #{a: 'text'}} | 1903 dictdict = #{one: #{}, two: #{a: 'text'}} |
1904 dictdict = #{one: #{}, two: #{}} | 1904 dictdict = #{one: #{}, two: #{}} |
1905 | |
1906 assert_equal({'': 0}, {matchstr('string', 'wont match'): 0}) | |
1905 | 1907 |
1906 CheckDefFailure(["var x = #{a:8}"], 'E1069:', 1) | 1908 CheckDefFailure(["var x = #{a:8}"], 'E1069:', 1) |
1907 CheckDefFailure(["var x = #{a : 8}"], 'E1068:', 1) | 1909 CheckDefFailure(["var x = #{a : 8}"], 'E1068:', 1) |
1908 CheckDefFailure(["var x = #{a :8}"], 'E1068:', 1) | 1910 CheckDefFailure(["var x = #{a :8}"], 'E1068:', 1) |
1909 CheckDefFailure(["var x = #{a: 8 , b: 9}"], 'E1068:', 1) | 1911 CheckDefFailure(["var x = #{a: 8 , b: 9}"], 'E1068:', 1) |