diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-07-23 20:37:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-23 20:37:56 +0200 |
commit | 0ad871dc4dfe1026e14931a55c225616b63f4c5b (patch) | |
tree | a83e1cf4e231864e182c4b9ce70c37460d2200dd /src/filepath.c | |
parent | 1b862c466ba4242857eec581f67982d265005ef4 (diff) |
patch 8.2.3206: Vim9: argument types are not checked at compile timev8.2.3206
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. (Yegappan Lakshmanan, closes #8611)
Diffstat (limited to 'src/filepath.c')
-rw-r--r-- | src/filepath.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/filepath.c b/src/filepath.c index 0d59a6b4f8..900c5bd69c 100644 --- a/src/filepath.c +++ b/src/filepath.c @@ -2180,6 +2180,12 @@ f_writefile(typval_T *argvars, typval_T *rettv) if (check_secure()) return; + if (in_vim9script() + && (check_for_list_or_blob_arg(argvars, 0) == FAIL + || check_for_string_arg(argvars, 1) == FAIL + || check_for_opt_string_arg(argvars, 2) == FAIL)) + return; + if (argvars[0].v_type == VAR_LIST) { list = argvars[0].vval.v_list; |