patch 9.1.1586: Vim9: can define an enum/interface in a function
Problem: Vim9: can define an enum/interface in a function
(lacygoill)
Solution: Give an error when defining an enum or an interface inside a
function (Yegappan Lakshmanan)
fixes: #17835
fixes: #17837
closes: #17837
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
4de931daae
commit
9239eadc71
@ -4750,6 +4750,14 @@ compile_def_function_body(
|
||||
emsg(_(e_class_can_only_be_used_in_script));
|
||||
return FAIL;
|
||||
|
||||
case CMD_enum:
|
||||
emsg(_(e_enum_can_only_be_used_in_script));
|
||||
return FAIL;
|
||||
|
||||
case CMD_interface:
|
||||
emsg(_(e_interface_can_only_be_used_in_script));
|
||||
return FAIL;
|
||||
|
||||
case CMD_type:
|
||||
emsg(_(e_type_can_only_be_used_in_script));
|
||||
return FAIL;
|
||||
|
||||
Reference in New Issue
Block a user