vim-patch:8.2.1466: Vim9: cannot index or slice a variable with type "any"

Problem:    Vim9: cannot index or slice a variable with type "any".
Solution:   Add runtime index and slice.

cc673e746a

Omit E1024 and E1062: Vim9 script only.
Omit string_slice() and char_idx2byte(): Vim9 script only.
Remove the first tv_is_luafunc() check because it always returns false.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-05-04 14:15:54 +08:00
parent b9e34571f9
commit 7ac63906ea
2 changed files with 209 additions and 184 deletions

View File

@@ -795,7 +795,7 @@ int tv_list_slice_or_index(list_T *list, bool range, int n1_arg, int n2_arg, typ
}
return FAIL;
}
n1 = len;
n1 = n1 < 0 ? 0 : len;
}
if (range) {
if (n2 < 0) {