Mercurial > vim
comparison src/eval.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 | 9062315f9de1 |
children | 3e9a91624b40 |
comparison
equal
deleted
inserted
replaced
33342:bc1076074f49 | 33343:41b50abddeea |
---|---|
1558 if (om != NULL) | 1558 if (om != NULL) |
1559 { | 1559 { |
1560 switch (om->ocm_access) | 1560 switch (om->ocm_access) |
1561 { | 1561 { |
1562 case VIM_ACCESS_PRIVATE: | 1562 case VIM_ACCESS_PRIVATE: |
1563 semsg(_(e_cannot_access_private_member_str), | 1563 semsg(_(e_cannot_access_private_variable_str), |
1564 om->ocm_name); | 1564 om->ocm_name); |
1565 return NULL; | 1565 return NULL; |
1566 case VIM_ACCESS_READ: | 1566 case VIM_ACCESS_READ: |
1567 // If [idx] or .key following, read only OK. | 1567 // If [idx] or .key following, read only OK. |
1568 if (*p == '[' || *p == '.') | 1568 if (*p == '[' || *p == '.') |
1569 break; | 1569 break; |
1570 if ((flags & GLV_READ_ONLY) == 0) | 1570 if ((flags & GLV_READ_ONLY) == 0) |
1571 { | 1571 { |
1572 semsg(_(e_member_is_not_writable_str), | 1572 semsg(_(e_variable_is_not_writable_str), |
1573 om->ocm_name, cl->class_name); | 1573 om->ocm_name, cl->class_name); |
1574 return NULL; | 1574 return NULL; |
1575 } | 1575 } |
1576 break; | 1576 break; |
1577 case VIM_ACCESS_ALL: | 1577 case VIM_ACCESS_ALL: |