Mercurial > vim
diff src/testdir/test_vim9_disassemble.vim @ 22284:6b385c2b9ff5 v8.2.1691
patch 8.2.1691: Vim9: list<any> is not accepted where list<number> is expected
Commit: https://github.com/vim/vim/commit/5e654230777ad21363a929dce3cfe0387da031a7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 16 15:22:00 2020 +0200
patch 8.2.1691: Vim9: list<any> is not accepted where list<number> is expected
Problem: Vim9: list<any> is not accepted where list<number> is expected.
Solution: Add functions to allocate and free a type_T, use it in
ISN_CHECKTYPE. (closes #6959)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Sep 2020 15:30:07 +0200 |
parents | d835f2fdfcfc |
children | 15003353a464 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -258,7 +258,7 @@ def Test_disassemble_list_assign() '\d STORE $2\_s*' .. '\[x, y; l\] = g:stringlist\_s*' .. '\d LOADG g:stringlist\_s*' .. - '\d CHECKTYPE list stack\[-1\]\_s*' .. + '\d CHECKTYPE list<any> stack\[-1\]\_s*' .. '\d CHECKLEN >= 2\_s*' .. '\d\+ ITEM 0\_s*' .. '\d\+ CHECKTYPE string stack\[-1\]\_s*' .. @@ -829,7 +829,7 @@ def Test_disassemble_for_loop_eval() '\d STORE -1 in $1\_s*' .. '\d PUSHS "\["one", "two"\]"\_s*' .. '\d BCALL eval(argc 1)\_s*' .. - '\d CHECKTYPE list stack\[-1\]\_s*' .. + '\d CHECKTYPE list<any> stack\[-1\]\_s*' .. '\d FOR $1 -> \d\+\_s*' .. '\d STORE $2\_s*' .. 'res ..= str\_s*' .. @@ -1144,7 +1144,7 @@ def Test_disassemble_any_slice() '\d STORE $0\_s*' .. 'return res\_s*' .. '\d LOAD $0\_s*' .. - '\d CHECKTYPE list stack\[-1\]\_s*' .. + '\d CHECKTYPE list<number> stack\[-1\]\_s*' .. '\d RETURN', instr) assert_equal([2, 3, 4], AnySlice())