comparison src/testing.c @ 25198:eafc0e07b188 v8.2.3135

patch 8.2.3135: Vim9: builtin function arguments not checked at compile time Commit: https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Jul 10 13:15:41 2021 +0200 patch 8.2.3135: Vim9: builtin function arguments not checked at compile time Problem: Vim9: builtin function arguments not checked at compile time. Solution: Add more type checks. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/8539)
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Jul 2021 13:30:06 +0200
parents 54c0cb81e6a7
children a703b3f28ef4
comparison
equal deleted inserted replaced
25197:c8c0a86999f1 25198:eafc0e07b188
1094 * "test_ignore_error()" function 1094 * "test_ignore_error()" function
1095 */ 1095 */
1096 void 1096 void
1097 f_test_ignore_error(typval_T *argvars, typval_T *rettv UNUSED) 1097 f_test_ignore_error(typval_T *argvars, typval_T *rettv UNUSED)
1098 { 1098 {
1099 ignore_error_for_testing(tv_get_string(&argvars[0])); 1099 if (argvars[0].v_type != VAR_STRING)
1100 emsg(_(e_invarg));
1101 else
1102 ignore_error_for_testing(tv_get_string(&argvars[0]));
1100 } 1103 }
1101 1104
1102 void 1105 void
1103 f_test_null_blob(typval_T *argvars UNUSED, typval_T *rettv) 1106 f_test_null_blob(typval_T *argvars UNUSED, typval_T *rettv)
1104 { 1107 {