Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
20028:f0fb61802fe7 | 20029:8fb1cf4c44d5 |
---|---|
2271 | 2271 |
2272 /* | 2272 /* |
2273 * ":endfunction" when not after a ":function" | 2273 * ":endfunction" when not after a ":function" |
2274 */ | 2274 */ |
2275 void | 2275 void |
2276 ex_endfunction(exarg_T *eap UNUSED) | 2276 ex_endfunction(exarg_T *eap) |
2277 { | 2277 { |
2278 emsg(_("E193: :endfunction not inside a function")); | 2278 if (eap->cmdidx == CMD_enddef) |
2279 emsg(_("E193: :enddef not inside a function")); | |
2280 else | |
2281 emsg(_("E193: :endfunction not inside a function")); | |
2279 } | 2282 } |
2280 | 2283 |
2281 /* | 2284 /* |
2282 * Return TRUE if the string "p" looks like a ":while" or ":for" command. | 2285 * Return TRUE if the string "p" looks like a ":while" or ":for" command. |
2283 */ | 2286 */ |