comparison src/change.c @ 25356:1cde96e768e4 v8.2.3215

patch 8.2.3215: Vim9: argument types are not checked at compile time Commit: https://github.com/vim/vim/commit/5bca906b307728fa74a112914dc55b424d512d39 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Jul 24 21:33:26 2021 +0200 patch 8.2.3215: Vim9: argument types are not checked at compile time Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks. Sort the argument lists. (Yegappan Lakshmanan, closes #8626)
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Jul 2021 21:45:04 +0200
parents 5932642234e1
children ac88cd21ae88
comparison
equal deleted inserted replaced
25355:efef27c0f8a0 25356:1cde96e768e4
238 f_listener_add(typval_T *argvars, typval_T *rettv) 238 f_listener_add(typval_T *argvars, typval_T *rettv)
239 { 239 {
240 callback_T callback; 240 callback_T callback;
241 listener_T *lnr; 241 listener_T *lnr;
242 buf_T *buf = curbuf; 242 buf_T *buf = curbuf;
243
244 if (in_vim9script() && check_for_opt_buffer_arg(argvars, 1) == FAIL)
245 return;
243 246
244 callback = get_callback(&argvars[0]); 247 callback = get_callback(&argvars[0]);
245 if (callback.cb_name == NULL) 248 if (callback.cb_name == NULL)
246 return; 249 return;
247 250