mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.1641: Vim9: cannot use 0 or 1 where a bool is expected
Problem: Vim9: cannot use 0 or 1 where a bool is expected. Solution: Allow using 0 and 1 for a bool type. (closes #6903)
This commit is contained in:
@@ -45,6 +45,11 @@ def Test_assignment()
|
||||
let bool2: bool = false
|
||||
assert_equal(v:false, bool2)
|
||||
|
||||
let bool3: bool = 0
|
||||
assert_equal(0, bool3)
|
||||
let bool4: bool = 1
|
||||
assert_equal(1, bool4)
|
||||
|
||||
CheckDefFailure(['let x:string'], 'E1069:')
|
||||
CheckDefFailure(['let x:string = "x"'], 'E1069:')
|
||||
CheckDefFailure(['let a:string = "x"'], 'E1069:')
|
||||
|
Reference in New Issue
Block a user