patch 9.1.1788: Vim9: can declare a void variable
Problem: Vim9: can declare a void variable (Ernie Rael) Solution: Disallow such variable declaration (Yegappan Lakshmanan) fixes: #13773 closes: #18382 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a7680a1a69
commit
7376fa3fd8
@ -2223,7 +2223,8 @@ get_lval(
|
||||
lp->ll_type = parse_type(&tp,
|
||||
&SCRIPT_ITEM(current_sctx.sc_sid)->sn_type_list,
|
||||
NULL, NULL, !quiet);
|
||||
if (lp->ll_type == NULL && !quiet)
|
||||
if (!quiet && (lp->ll_type == NULL
|
||||
|| !valid_declaration_type(lp->ll_type)))
|
||||
return NULL;
|
||||
lp->ll_name_end = tp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user