v9.CheckDefFailure(['var x = ({'], 'E723:', 2)
v9.CheckScriptFailure(['vim9script', 'var x = ({'], 'E723:', 2)
v9.CheckDefExecAndScriptFailure(['{}[getftype("file")]'], 'E716: Key not present in Dictionary: ""', 1)
+
+ # invalid dot notation key name
+ v9.CheckDefAndScriptFailure(['var x = { "a#b": 1 }', 'x.a#b'], ['E488:', 'E716:'], 2)
+ v9.CheckDefAndScriptFailure(['var x = { "a:b": 1 }', 'x.a:b'], ['E488:', 'E716:'], 2)
enddef
def Test_expr9_dict_vim9script()
return FAIL;
}
p = *arg;
- if (eval_isdictc(*p))
- while (eval_isnamec(*p))
- MB_PTR_ADV(p);
+ while (eval_isdictc(*p))
+ MB_PTR_ADV(p);
if (p == *arg)
{
semsg(_(e_syntax_error_at_str), *arg);