mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -05:00
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
@@ -2121,7 +2121,8 @@ compile_lhs_set_type(cctx_T *cctx, lhs_T *lhs, char_u *var_end, int is_decl)
|
||||
|
||||
p = skipwhite(var_end + 1);
|
||||
lhs->lhs_type = parse_type(&p, cctx->ctx_type_list, cctx->ctx_ufunc, cctx, TRUE);
|
||||
if (lhs->lhs_type == NULL)
|
||||
if (lhs->lhs_type == NULL
|
||||
|| !valid_declaration_type(lhs->lhs_type))
|
||||
return FAIL;
|
||||
|
||||
lhs->lhs_has_type = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user