1
0
forked from aniani/vim

patch 8.2.3856: Vim9: not enough tests

Problem:    Vim9: not enough tests.
Solution:   Run more expression tests also with Vim9. Fix an uncovered
            problem.
This commit is contained in:
Bram Moolenaar
2021-12-19 21:34:05 +00:00
parent bc404bfb32
commit fea43e44c0
4 changed files with 556 additions and 466 deletions

View File

@@ -4308,7 +4308,8 @@ compile_leader(cctx_T *cctx, int numeric_only, char_u *start, char_u **end)
type_T *type;
type = ((type_T **)stack->ga_data)[stack->ga_len - 1];
if (need_type(type, &t_number, -1, 0, cctx, FALSE, FALSE) == FAIL)
if (type != &t_float && need_type(type, &t_number,
-1, 0, cctx, FALSE, FALSE) == FAIL)
return FAIL;
while (p > start && (p[-1] == '-' || p[-1] == '+'))