mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1454: Vim9: failure invoking lambda with wrong arguments
Problem: Vim9: failure invoking lambda with wrong arguments. Solution: Handle invalid arguments. Add a test.
This commit is contained in:
@@ -1361,6 +1361,9 @@ generate_CALL(cctx_T *cctx, ufunc_T *ufunc, int pushed_argcount)
|
||||
continue;
|
||||
expected = ufunc->uf_arg_types[i];
|
||||
}
|
||||
else if (ufunc->uf_va_type == NULL)
|
||||
// possibly a lambda
|
||||
expected = &t_any;
|
||||
else
|
||||
expected = ufunc->uf_va_type->tt_member;
|
||||
actual = ((type_T **)stack->ga_data)[stack->ga_len - argcount + i];
|
||||
|
Reference in New Issue
Block a user