mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.3203: Vim9: compiled string expression causes type error
Problem: Vim9: compiled string expression causes type error. (Yegappan Lakshmanan) Solution: Remove the string type from the stack.
This commit is contained in:
parent
5dd839ce20
commit
cd268017cf
@ -711,6 +711,8 @@ static argcheck_T arg3_slice[] = {arg_slice1, arg_number, arg_number};
|
|||||||
static argcheck_T arg4_strpart[] = {arg_string, arg_number, arg_number, arg_bool};
|
static argcheck_T arg4_strpart[] = {arg_string, arg_number, arg_number, arg_bool};
|
||||||
static argcheck_T arg23_win_execute[] = {arg_number, arg_string_or_list_string, arg_string};
|
static argcheck_T arg23_win_execute[] = {arg_number, arg_string_or_list_string, arg_string};
|
||||||
static argcheck_T arg4_match_func[] = {arg_string_or_list_any, arg_string, arg_number, arg_number};
|
static argcheck_T arg4_match_func[] = {arg_string_or_list_any, arg_string, arg_number, arg_number};
|
||||||
|
static argcheck_T arg15_search[] = {arg_string, arg_string, arg_number, arg_number, NULL};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Functions that return the return type of a builtin function.
|
* Functions that return the return type of a builtin function.
|
||||||
@ -1738,7 +1740,7 @@ static funcentry_T global_functions[] =
|
|||||||
ret_number, f_screenrow},
|
ret_number, f_screenrow},
|
||||||
{"screenstring", 2, 2, FEARG_1, arg2_number,
|
{"screenstring", 2, 2, FEARG_1, arg2_number,
|
||||||
ret_string, f_screenstring},
|
ret_string, f_screenstring},
|
||||||
{"search", 1, 5, FEARG_1, NULL,
|
{"search", 1, 5, FEARG_1, arg15_search,
|
||||||
ret_number, f_search},
|
ret_number, f_search},
|
||||||
{"searchcount", 0, 1, FEARG_1, arg1_dict_any,
|
{"searchcount", 0, 1, FEARG_1, arg1_dict_any,
|
||||||
ret_dict_any, f_searchcount},
|
ret_dict_any, f_searchcount},
|
||||||
|
@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3203,
|
||||||
/**/
|
/**/
|
||||||
3202,
|
3202,
|
||||||
/**/
|
/**/
|
||||||
|
@ -3244,6 +3244,9 @@ compile_string(isn_T *isn, cctx_T *cctx)
|
|||||||
int instr_count;
|
int instr_count;
|
||||||
isn_T *instr = NULL;
|
isn_T *instr = NULL;
|
||||||
|
|
||||||
|
// Remove the string type from the stack.
|
||||||
|
--cctx->ctx_type_stack.ga_len;
|
||||||
|
|
||||||
// Temporarily reset the list of instructions so that the jump labels are
|
// Temporarily reset the list of instructions so that the jump labels are
|
||||||
// correct.
|
// correct.
|
||||||
cctx->ctx_instr.ga_len = 0;
|
cctx->ctx_instr.ga_len = 0;
|
||||||
@ -4263,8 +4266,8 @@ compile_subscript(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not skip over white space to find the "(", "execute 'x' ()" is
|
// Do not skip over white space to find the "(", "execute 'x' (expr)"
|
||||||
// not a function call.
|
// is not a function call.
|
||||||
if (**arg == '(')
|
if (**arg == '(')
|
||||||
{
|
{
|
||||||
garray_T *stack = &cctx->ctx_type_stack;
|
garray_T *stack = &cctx->ctx_type_stack;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user