Mercurial > vim
comparison src/quickfix.c @ 25384:e8e2c4d33b9b v8.2.3229
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Commit: https://github.com/vim/vim/commit/4490ec4e839e45a2e6923c265c7e9e64c240b805
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Jul 27 22:00:44 2021 +0200
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Problem: Vim9: runtime and compile time type checks are not the same.
Solution: Add more runtime type checks for builtin functions. (Yegappan
Lakshmanan, closes #8646)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 27 Jul 2021 22:15:06 +0200 |
parents | 1e6da8364a02 |
children | db9fdfb86679 |
comparison
equal
deleted
inserted
replaced
25383:510e4fcb5363 | 25384:e8e2c4d33b9b |
---|---|
8368 f_getloclist(typval_T *argvars UNUSED, typval_T *rettv UNUSED) | 8368 f_getloclist(typval_T *argvars UNUSED, typval_T *rettv UNUSED) |
8369 { | 8369 { |
8370 # ifdef FEAT_QUICKFIX | 8370 # ifdef FEAT_QUICKFIX |
8371 win_T *wp; | 8371 win_T *wp; |
8372 | 8372 |
8373 if (in_vim9script() | |
8374 && (check_for_number_arg(argvars, 0) == FAIL | |
8375 || check_for_opt_dict_arg(argvars, 1) == FAIL)) | |
8376 return; | |
8377 | |
8373 wp = find_win_by_nr_or_id(&argvars[0]); | 8378 wp = find_win_by_nr_or_id(&argvars[0]); |
8374 get_qf_loc_list(FALSE, wp, &argvars[1], rettv); | 8379 get_qf_loc_list(FALSE, wp, &argvars[1], rettv); |
8375 # endif | 8380 # endif |
8376 } | 8381 } |
8377 | 8382 |
8380 */ | 8385 */ |
8381 void | 8386 void |
8382 f_getqflist(typval_T *argvars UNUSED, typval_T *rettv UNUSED) | 8387 f_getqflist(typval_T *argvars UNUSED, typval_T *rettv UNUSED) |
8383 { | 8388 { |
8384 # ifdef FEAT_QUICKFIX | 8389 # ifdef FEAT_QUICKFIX |
8390 if (in_vim9script() && check_for_opt_dict_arg(argvars, 0) == FAIL) | |
8391 return; | |
8392 | |
8385 get_qf_loc_list(TRUE, NULL, &argvars[0], rettv); | 8393 get_qf_loc_list(TRUE, NULL, &argvars[0], rettv); |
8386 # endif | 8394 # endif |
8387 } | 8395 } |
8388 | 8396 |
8389 /* | 8397 /* |