summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index aeb950ca6..6408b67bf 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -4821,22 +4821,11 @@ compile_def_function(ufunc_T *ufunc, int set_return_type)
p = (*ea.cmd == '&' || *ea.cmd == '$' || *ea.cmd == '@')
? ea.cmd + 1 : ea.cmd;
p = to_name_end(p);
- if (p > ea.cmd && *p != NUL)
+ if ((p > ea.cmd && *p != NUL) || *p == '(')
{
int oplen;
int heredoc;
- // "funcname(" is always a function call.
- // "varname[]" is an expression.
- // "varname->expr" is an expression.
- if (*p == '('
- || *p == '['
- || ((p - ea.cmd) > 2 && ea.cmd[1] == ':')
- || (*p == '-' && p[1] == '>'))
- {
- // TODO
- }
-
oplen = assignment_len(skipwhite(p), &heredoc);
if (oplen > 0)
{