mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.0340: Vim9: function and partial types not tested
Problem: Vim9: function and partial types not tested. Solution: Support more for partial, add tests.
This commit is contained in:
@@ -705,6 +705,23 @@ generate_PUSHFUNC(cctx_T *cctx, char_u *name)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate an ISN_PUSHPARTIAL instruction with partial "part".
|
||||
* Consumes "name".
|
||||
*/
|
||||
static int
|
||||
generate_PUSHPARTIAL(cctx_T *cctx, partial_T *part)
|
||||
{
|
||||
isn_T *isn;
|
||||
|
||||
if ((isn = generate_instr_type(cctx, ISN_PUSHPARTIAL,
|
||||
&t_partial_any)) == NULL)
|
||||
return FAIL;
|
||||
isn->isn_arg.partial = part;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate an ISN_STORE instruction.
|
||||
*/
|
||||
@@ -3605,8 +3622,7 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
|
||||
generate_PUSHFUNC(cctx, NULL);
|
||||
break;
|
||||
case VAR_PARTIAL:
|
||||
// generate_PUSHPARTIAL(cctx, NULL);
|
||||
emsg("Partial type not supported yet");
|
||||
generate_PUSHPARTIAL(cctx, NULL);
|
||||
break;
|
||||
case VAR_LIST:
|
||||
generate_NEWLIST(cctx, 0);
|
||||
@@ -5228,7 +5244,7 @@ delete_instr(isn_T *isn)
|
||||
break;
|
||||
|
||||
case ISN_PUSHPARTIAL:
|
||||
// TODO
|
||||
partial_unref(isn->isn_arg.partial);
|
||||
break;
|
||||
|
||||
case ISN_PUSHJOB:
|
||||
|
Reference in New Issue
Block a user