summaryrefslogtreecommitdiffstats
path: root/src/vim9class.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9class.c')
-rw-r--r--src/vim9class.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vim9class.c b/src/vim9class.c
index 52c2f76..4314b52 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)