diff src/ex_eval.c @ 20029:8fb1cf4c44d5 v8.2.0570

patch 8.2.0570: Vim9: no error when omitting type from argument Commit: https://github.com/vim/vim/commit/6e949784be29bfaea6e49a9d8231481eae10fab6 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 13 17:21:00 2020 +0200 patch 8.2.0570: Vim9: no error when omitting type from argument Problem: Vim9: no error when omitting type from argument. Solution: Enforce specifying argument types.
author Bram Moolenaar <Bram@vim.org>
date Mon, 13 Apr 2020 17:30:05 +0200
parents 5feb426d2ea1
children 2c23053c654a
line wrap: on
line diff
--- 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"));
 }
 
 /*