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.
diff --git a/src/proto/evalbuffer.pro b/src/proto/evalbuffer.pro
index b59c5f5..57c84ce 100644
--- a/src/proto/evalbuffer.pro
+++ b/src/proto/evalbuffer.pro
@@ -16,6 +16,7 @@
void f_deletebufline(typval_T *argvars, typval_T *rettv);
void f_getbufinfo(typval_T *argvars, typval_T *rettv);
void f_getbufline(typval_T *argvars, typval_T *rettv);
+type_T *ret_f_getline(int argcount, type_T **argtypes);
void f_getline(typval_T *argvars, typval_T *rettv);
void f_setbufline(typval_T *argvars, typval_T *rettv);
void f_setline(typval_T *argvars, typval_T *rettv);
diff --git a/src/proto/evalfunc.pro b/src/proto/evalfunc.pro
index 14a1a56..33dea2c 100644
--- a/src/proto/evalfunc.pro
+++ b/src/proto/evalfunc.pro
@@ -4,7 +4,7 @@
int find_internal_func(char_u *name);
int has_internal_func(char_u *name);
char *internal_func_name(int idx);
-type_T *internal_func_ret_type(int idx, int argcount);
+type_T *internal_func_ret_type(int idx, int argcount, type_T **argtypes);
int check_internal_func(int idx, int argcount);
int call_internal_func(char_u *name, int argcount, typval_T *argvars, typval_T *rettv);
void call_internal_func_by_idx(int idx, typval_T *argvars, typval_T *rettv);