From ac7731895c996acef4d02b784f9952749226e203 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sat, 27 Apr 2024 11:36:12 +0200 Subject: patch 9.1.0376: Vim9: Trailing commands after class/enum keywords ignored Problem: Vim9: Trailing commands after class/enum keywords ignored Solution: Remove EX_TRLBAR keyword from command definition (Yegappan Lakshmanan) closes: #14649 Signed-off-by: Yegappan Lakshmanan Signed-off-by: Christian Brabandt --- src/vim9class.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vim9class.c') diff --git a/src/vim9class.c b/src/vim9class.c index 52c2f764db..4314b52901 100644 --- a/src/vim9class.c +++ b/src/vim9class.c @@ -136,6 +136,13 @@ parse_member( fill_evalarg_from_eap(&evalarg, eap, FALSE); (void)skip_expr_concatenate(&init_arg, &expr_start, &expr_end, &evalarg); + init_arg = skipwhite(init_arg); + if (*init_arg != NUL) + { + semsg(_(e_trailing_characters_str), init_arg); + return FAIL; + } + // No type specified for the member. Set it to "any" and the correct // type will be set when the object is instantiated. if (type == NULL) -- cgit v1.2.3