1
0
forked from aniani/vim

patch 8.2.2449: Vim9: flatten() always changes the list type

Problem:    Vim9: flatten() always changes the list type.
Solution:   Disallow using flatten() and add flattennew().
This commit is contained in:
Bram Moolenaar
2021-02-01 20:14:51 +01:00
parent 9d20daffc2
commit 3b69006973
10 changed files with 98 additions and 14 deletions

View File

@@ -2900,6 +2900,12 @@ compile_call(
idx = find_internal_func(name);
if (idx >= 0)
{
if (STRCMP(name, "flatten") == 0)
{
emsg(_(e_cannot_use_flatten_in_vim9_script));
goto theend;
}
if (STRCMP(name, "add") == 0 && argcount == 2)
{
garray_T *stack = &cctx->ctx_type_stack;