summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-21 20:38:46 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-21 20:38:46 +0200
commitc4c5642513ac41b22b7772cc880c776c69e964c9 (patch)
tree965a03640669df1b17441d048efc895fbe63d18c /src/vim9compile.c
parentcd9172077bc8c0aafddf2e5367cc0ae2c00c8ff7 (diff)
downloadvim-git-8.2.3195.tar.gz
patch 8.2.3195: Vim9: unclear error when passing too many arguments to lambdav8.2.3195
Problem: Vim9: unclear error when passing too many arguments to lambda. Solution: Pass the expression itself instead of "[expression]". (closes #8604)
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 701487548..5a39906ef 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -4354,8 +4354,7 @@ compile_subscript(
}
type = ((type_T **)stack->ga_data)[stack->ga_len - 1];
- if (generate_PCALL(cctx, argcount,
- (char_u *)"[expression]", type, FALSE) == FAIL)
+ if (generate_PCALL(cctx, argcount, p - 2, type, FALSE) == FAIL)
return FAIL;
}
else