diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-07-24 16:16:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-24 16:16:15 +0200 |
commit | 7973de35ba6840b7e106e2e8a8912522e9a2a960 (patch) | |
tree | 8e8a1848f52a82af0a31111a0846c319a9544dd7 /src/if_cscope.c | |
parent | dd0b287c1ec8314034a2dbb14c4267994c47520c (diff) | |
download | vim-git-7973de35ba6840b7e106e2e8a8912522e9a2a960.tar.gz |
patch 8.2.3211: Vim9: argument types are not checked at compile timev8.2.3211
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)
Diffstat (limited to 'src/if_cscope.c')
-rw-r--r-- | src/if_cscope.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/if_cscope.c b/src/if_cscope.c index 815db55c1..4e313cebc 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -2496,6 +2496,14 @@ f_cscope_connection(typval_T *argvars UNUSED, typval_T *rettv UNUSED) char_u *prepend = NULL; char_u buf[NUMBUFLEN]; + if (in_vim9script() + && (check_for_opt_number_arg(argvars, 0) == FAIL + || (argvars[0].v_type != VAR_UNKNOWN + && (check_for_opt_string_arg(argvars, 1) == FAIL + || (argvars[1].v_type != VAR_UNKNOWN + && check_for_opt_string_arg(argvars, 2) == FAIL))))) + return; + if (argvars[0].v_type != VAR_UNKNOWN && argvars[1].v_type != VAR_UNKNOWN) { |