0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.2936: Vim9: converting number to bool uses wrong stack offset

Problem:    Vim9: converting number to bool uses wrong stack offset. (Salman
            Halim)
Solution:   Include the offset in the 2BOOL command.
This commit is contained in:
Bram Moolenaar
2021-06-04 21:00:32 +02:00
parent 6c4c404c58
commit 5fa9b24440
6 changed files with 104 additions and 34 deletions

View File

@@ -2480,6 +2480,25 @@ def Test_expr7_dict_vim9script()
endif
enddef
def Test_expr7_call_2bool()
var lines =<< trim END
vim9script
def BrokenCall(nr: number, mode: bool, use: string): void
assert_equal(3, nr)
assert_equal(false, mode)
assert_equal('ab', use)
enddef
def TestBrokenCall(): void
BrokenCall(3, 0, 'ab')
enddef
TestBrokenCall()
END
CheckScriptSuccess(lines)
enddef
let g:oneString = 'one'
def Test_expr_member()