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

patch 8.2.1668: Vim9: not accepting 0 or 1 as bool when type is any

Problem:    Vim9: not accepting 0 or 1 as bool when type is any.
Solution:   Convert the type with the CHECKTYPE instruction. (closes #6913)
This commit is contained in:
Bram Moolenaar
2020-09-12 19:11:23 +02:00
parent 0f769815c8
commit dadaddd59f
3 changed files with 22 additions and 5 deletions

View File

@@ -2369,6 +2369,9 @@ def Test_expr7_method_call()
type: '',
module: ''}
], getloclist(0))
let result: bool = get(#{n: 0}, 'n', 0)
assert_equal(false, result)
enddef
func Test_expr7_trailing_fails()