comparison src/channel.c @ 25348:75031a22be39 v8.2.3211

patch 8.2.3211: Vim9: argument types are not checked at compile time Commit: https://github.com/vim/vim/commit/7973de35ba6840b7e106e2e8a8912522e9a2a960 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Jul 24 16:16:15 2021 +0200 patch 8.2.3211: 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. Fix type check for matchaddpos(). (Yegappan Lakshmanan, closes #8619)
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Jul 2021 16:30:03 +0200
parents 4d3c68196d05
children e8e2c4d33b9b
comparison
equal deleted inserted replaced
25347:1052b30de969 25348:75031a22be39
4888 * "ch_log()" function 4888 * "ch_log()" function
4889 */ 4889 */
4890 void 4890 void
4891 f_ch_log(typval_T *argvars, typval_T *rettv UNUSED) 4891 f_ch_log(typval_T *argvars, typval_T *rettv UNUSED)
4892 { 4892 {
4893 char_u *msg = tv_get_string(&argvars[0]); 4893 char_u *msg;
4894 channel_T *channel = NULL; 4894 channel_T *channel = NULL;
4895 4895
4896 if (in_vim9script()
4897 && (check_for_string_arg(argvars, 0) == FAIL
4898 || check_for_opt_chan_or_job_arg(argvars, 1) == FAIL))
4899 return;
4900
4901 msg = tv_get_string(&argvars[0]);
4896 if (argvars[1].v_type != VAR_UNKNOWN) 4902 if (argvars[1].v_type != VAR_UNKNOWN)
4897 channel = get_channel_arg(&argvars[1], FALSE, FALSE, 0); 4903 channel = get_channel_arg(&argvars[1], FALSE, FALSE, 0);
4898 4904
4899 ch_log(channel, "%s", msg); 4905 ch_log(channel, "%s", msg);
4900 } 4906 }