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.
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index 2218680..dc6858f 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -2480,6 +2480,25 @@
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()