1
0
forked from aniani/vim

patch 8.2.3852: Vim9: not enough tests

Problem:    Vim9: not enough tests.
Solution:   Also run existing tests for Vim9 script.  Make errors more
            consistent.
This commit is contained in:
Bram Moolenaar
2021-12-19 15:17:21 +00:00
parent 265f811f5a
commit f47c5a8e2d
5 changed files with 41 additions and 6 deletions

View File

@@ -3043,7 +3043,25 @@ compile_member(int is_slice, int *keeping_dict, cctx_T *cctx)
}
else
{
emsg(_(e_string_list_dict_or_blob_required));
switch (vartype)
{
case VAR_FUNC:
case VAR_PARTIAL:
emsg(_(e_cannot_index_a_funcref));
break;
case VAR_BOOL:
case VAR_SPECIAL:
case VAR_JOB:
case VAR_CHANNEL:
case VAR_INSTR:
case VAR_UNKNOWN:
case VAR_ANY:
case VAR_VOID:
emsg(_(e_cannot_index_special_variable));
break;
default:
emsg(_(e_string_list_dict_or_blob_required));
}
return FAIL;
}
return OK;