mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.0339: Vim9: function return type may depend on arguments
Problem: Vim9: function return type may depend on arguments. Solution: Instead of a fixed return type use a function to figure out the return type.
This commit is contained in:
@@ -752,6 +752,12 @@ f_getbufline(typval_T *argvars, typval_T *rettv)
|
||||
get_buffer_lines(buf, lnum, end, TRUE, rettv);
|
||||
}
|
||||
|
||||
type_T *
|
||||
ret_f_getline(int argcount, type_T **argtypes UNUSED)
|
||||
{
|
||||
return argcount == 1 ? &t_string : &t_list_string;
|
||||
}
|
||||
|
||||
/*
|
||||
* "getline(lnum, [end])" function
|
||||
*/
|
||||
|
Reference in New Issue
Block a user