https://github.com/vim/vim/pull/13706
(7 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@yegappan commented on this pull request.
In src/eval.c:
> if (di != NULL && di->di_tv.v_type == VAR_TYPEALIAS)
{
- semsg(_(e_cannot_modify_typealias),
- di->di_tv.vval.v_typealias->ta_name);
+ // TODO: use standard message, note that if a class type
+ // is caught here, it does not have a class object
+ // so no name.
The class name is available in di->di_tv.vval.v_class->class_name.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@yegappan commented on this pull request.
In src/evalvars.c:
> if (di->di_tv.v_type == VAR_TYPEALIAS)
{
+ check_typval_is_value(&di->di_tv);
semsg(_(e_cannot_modify_typealias),
This semsg() can be removed?
In src/evalvars.c:
> @@ -3974,8 +3974,10 @@ set_var_const( goto failed; } + //if (check_typval_is_value(&di->di_tv) == FAIL) // TODO: class is null
Under what conditions is di->di_tv.vval.v_class NULL?
In src/vim9type.c:
> @@ -1871,7 +1871,11 @@ check_typval_is_value(typval_T *tv)
return OK;
if (tv->v_type == VAR_CLASS)
{
- semsg(_(e_using_class_as_value_str), tv->vval.v_class->class_name);
+ if (tv->vval.v_class != NULL)
+ semsg(_(e_using_class_as_value_str), tv->vval.v_class->class_name);
+ else
+ //abort(); // How is there a typval without a v_class?
If null_class is used, then v_class will be null.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@errael pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Turns out after preventing high level use of :type/:class as values. Many expression situations allowed them. This PR takes care of many of the leftovers. There's probably more out there.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra @yegappan If it is relevant, when considering if this PR should make it into vim9.1, this PR is all about error messages. It was delayed a few days by discovering/fixing an old bug that interfered.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@yegappan approved this pull request.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra @yegappan If it is relevant, when considering if this PR should make it into vim9.1, this PR is all about error messages. It was delayed a few days by discovering/fixing an old bug that interfered.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
thanks, applied
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()