comparison src/vim9type.c @ 33343:41b50abddeea v9.0.1935

patch 9.0.1935: Vim9: not consistent error messages Commit: https://github.com/vim/vim/commit/7fe8f43f49f4fa6f024d0e0ea76d3df5b62a0879 Author: RestorerZ <restorer@mail2k.ru> Date: Sun Sep 24 23:21:24 2023 +0200 patch 9.0.1935: Vim9: not consistent error messages Problem: Vim9: not consistent error messages Solution: Make error messages more consistent. Use "variable" for (object/class) member closes: #13155 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: RestorerZ <restorer@mail2k.ru>
author Christian Brabandt <cb@256bit.org>
date Sun, 24 Sep 2023 23:30:06 +0200
parents def9fc5c92d1
children bb99820510ef
comparison
equal deleted inserted replaced
33342:bc1076074f49 33343:41b50abddeea
646 if (type->tt_type == VAR_SPECIAL // null, none 646 if (type->tt_type == VAR_SPECIAL // null, none
647 || type->tt_type == VAR_VOID) 647 || type->tt_type == VAR_VOID)
648 { 648 {
649 char *tofree = NULL; 649 char *tofree = NULL;
650 char *name = type_name(type, &tofree); 650 char *name = type_name(type, &tofree);
651 semsg(_(e_invalid_type_for_object_member_str), name); 651 semsg(_(e_invalid_type_for_object_variable_str), name);
652 vim_free(tofree); 652 vim_free(tofree);
653 return FALSE; 653 return FALSE;
654 } 654 }
655 return TRUE; 655 return TRUE;
656 } 656 }
753 char *typename2 = type_name(actual, &tofree2); 753 char *typename2 = type_name(actual, &tofree2);
754 754
755 switch (where.wt_kind) 755 switch (where.wt_kind)
756 { 756 {
757 case WT_MEMBER: 757 case WT_MEMBER:
758 semsg(_(e_member_str_type_mismatch_expected_str_but_got_str), 758 semsg(_(e_variable_str_type_mismatch_expected_str_but_got_str),
759 where.wt_func_name, typename1, typename2); 759 where.wt_func_name, typename1, typename2);
760 break; 760 break;
761 case WT_METHOD: 761 case WT_METHOD:
762 semsg(_(e_method_str_type_mismatch_expected_str_but_got_str), 762 semsg(_(e_method_str_type_mismatch_expected_str_but_got_str),
763 where.wt_func_name, typename1, typename2); 763 where.wt_func_name, typename1, typename2);