diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-26 18:33:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-26 18:33:09 +0200 |
commit | 01865ade85d2508639e24aaca5948b09fb284a82 (patch) | |
tree | 23b3c3d7c3124101b560e7b517a7d33860dac806 /src/vim9compile.c | |
parent | ace6132aa8c5fce9d4965e1f2e3a42071815b9de (diff) |
patch 8.2.1302: Vim9: varargs arg after optional arg does not workv8.2.1302
Problem: Vim9: varargs arg after optional arg does not work
Solution: Check for the "..." first. (issue #6507)
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c index 31e761284e..8efb1f672f 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -2106,16 +2106,16 @@ parse_type(char_u **arg, garray_T *type_gap) first_optional = argcount; ++p; } - else if (first_optional != -1) - { - emsg(_("E1007: mandatory argument after optional argument")); - return &t_any; - } else if (STRNCMP(p, "...", 3) == 0) { flags |= TTFLAG_VARARGS; p += 3; } + else if (first_optional != -1) + { + emsg(_("E1007: mandatory argument after optional argument")); + return &t_any; + } arg_type[argcount++] = parse_type(&p, type_gap); |