File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,7 +244,10 @@ def Test_assignment_dict()
244244 # overwrite
245245 dict3[' key' ] = ' another'
246246
247- call CheckDefExecFailure ([' let dd = {}' , ' dd[""] = 6' ], ' E713:' )
247+ # empty key can be used
248+ let dd = {}
249+ dd[" " ] = 6
250+ assert_equal ({' ' : 6 }, dd)
248251
249252 # type becomes dict <any>
250253 let somedict = rand () > 0 ? #{a: 1 , b: 2 } : #{a: ' a' , b: ' b' }
@@ -783,13 +786,6 @@ def Test_try_catch()
783786 endtry
784787 assert_equal (300 , n )
785788
786- try
787- d [' ' ] = 3
788- catch /E713:/
789- n = 311
790- endtry
791- assert_equal (311 , n )
792-
793789 try
794790 unlet g: does_not_exist
795791 catch /E108:/
Original file line number Diff line number Diff line change @@ -754,6 +754,8 @@ static char *(features[]) =
754754
755755static int included_patches [] =
756756{ /* Add new patch number below this line */
757+ /**/
758+ 1337 ,
757759/**/
758760 1336 ,
759761/**/
Original file line number Diff line number Diff line change @@ -1422,11 +1422,8 @@ call_def_function(
14221422 dict_T * dict = tv_dict -> vval .v_dict ;
14231423 dictitem_T * di ;
14241424
1425- if (key == NULL || * key == NUL )
1426- {
1427- emsg (_ (e_emptykey ));
1428- goto on_error ;
1429- }
1425+ if (key == NULL )
1426+ key = (char_u * )"" ;
14301427 tv = STACK_TV_BOT (-3 );
14311428 di = dict_find (dict , key , -1 );
14321429 if (di != NULL )
You can’t perform that action at this time.
0 commit comments