0
0
mirror of https://github.com/vim/vim.git synced 2025-11-16 23:24:03 -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:
Yegappan Lakshmanan
2025-09-24 17:51:17 +00:00
committed by Christian Brabandt
parent a7680a1a69
commit 7376fa3fd8
13 changed files with 113 additions and 16 deletions

View File

@@ -306,7 +306,7 @@ parse_generic_func_type_args(
// parse the type
type_arg = parse_type(&p, &gfatab->gfat_arg_types, NULL, cctx, TRUE);
if (type_arg == NULL)
if (type_arg == NULL || !valid_declaration_type(type_arg))
return NULL;
char *ret_free = NULL;