diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-13 17:21:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-13 17:21:00 +0200 |
commit | 6e949784be29bfaea6e49a9d8231481eae10fab6 (patch) | |
tree | f287fb048090fac72a6ad88e776081855ca490cf /src/ex_eval.c | |
parent | fbda69b309ca1c9748eaac38ab85b9e3425bf834 (diff) | |
download | vim-git-6e949784be29bfaea6e49a9d8231481eae10fab6.tar.gz |
patch 8.2.0570: Vim9: no error when omitting type from argumentv8.2.0570
Problem: Vim9: no error when omitting type from argument.
Solution: Enforce specifying argument types.
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r-- | src/ex_eval.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c index 72da2f252..7ffc145ae 100644 --- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -2273,9 +2273,12 @@ rewind_conditionals( * ":endfunction" when not after a ":function" */ void -ex_endfunction(exarg_T *eap UNUSED) +ex_endfunction(exarg_T *eap) { - emsg(_("E193: :endfunction not inside a function")); + if (eap->cmdidx == CMD_enddef) + emsg(_("E193: :enddef not inside a function")); + else + emsg(_("E193: :endfunction not inside a function")); } /* |