diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-06-26 19:25:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-26 19:25:49 +0200 |
commit | 14ded11fcad77ebf41032ec80a95d516ca9acb1c (patch) | |
tree | 118966a6ffe086076d68f03244a39286b8a03ee4 /src/userfunc.c | |
parent | 3a3b10e87a10dd0bc355618dbfc4a0a6c828aad7 (diff) | |
download | vim-git-14ded11fcad77ebf41032ec80a95d516ca9acb1c.tar.gz |
patch 8.2.3056: Vim9: using default value in lambda gives confusing errorv8.2.3056
Problem: Vim9: using default value in lambda gives confusing error.
Solution: Pass "default_args" on the first pass to get the arguments.
(closes #8455)
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index e2e745c33..cedd37b9a 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -1222,7 +1222,7 @@ get_lambda_tv( s = *arg + 1; ret = get_function_args(&s, equal_arrow ? ')' : '-', NULL, types_optional ? &argtypes : NULL, types_optional, evalarg, - NULL, NULL, TRUE, NULL, NULL); + NULL, &default_args, TRUE, NULL, NULL); if (ret == FAIL || skip_arrow(s, equal_arrow, &ret_type, NULL) == NULL) { if (types_optional) |