1
0
forked from aniani/vim

patch 9.0.1631: passing wrong variable type to option gives multiple errors

Problem:    Passing a wrong variable type to an option gives multiple errors.
Solution:   Bail out early on failure. (closes #12504)
This commit is contained in:
zeertzjq
2023-06-14 16:39:54 +01:00
committed by Bram Moolenaar
parent 8d687a7424
commit 4c7cb372c1
9 changed files with 161 additions and 124 deletions

View File

@@ -145,6 +145,12 @@ def Test_assignment()
&ts %= 4
assert_equal(2, &ts)
assert_fails('&ts /= 0', ['E1154:', 'E1154:'])
assert_fails('&ts %= 0', ['E1154:', 'E1154:'])
assert_fails('&ts /= []', ['E745:', 'E745:'])
assert_fails('&ts %= []', ['E745:', 'E745:'])
assert_equal(2, &ts)
var f100: float = 100.0
f100 /= 5
assert_equal(20.0, f100)