Problem: Vim9: crash with unterminated dict. (Dhiraj Mishra)
Solution: Return empty string instead of NULL. (closes #7084)
CheckDefExecFailure(['var x: dict<number> = #{a: "x", b: 134}'], 'E1012:', 1)
CheckDefExecFailure(['var x: dict<string> = #{a: 234, b: "1"}'], 'E1012:', 1)
CheckDefExecFailure(['var x: dict<string> = #{a: "x", b: 134}'], 'E1012:', 1)
+
+ CheckDefFailure(['var x = ({'], 'E723:', 2)
enddef
def Test_expr7_dict_vim9script()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1802,
/**/
1801,
/**/
failret:
if (*arg == NULL)
+ {
semsg(_(e_missing_dict_end), _("[end of lines]"));
+ *arg = (char_u *)"";
+ }
dict_unref(d);
return FAIL;
}