0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

patch 8.2.1419: Vim9: not operator applied too early

Problem:    Vim9: not operator applied too early.
Solution:   Implement the "numeric_only" argument. (closes #6680)
This commit is contained in:
Bram Moolenaar
2020-08-10 23:09:37 +02:00
parent 8294d49937
commit 59eccb92e3
3 changed files with 35 additions and 16 deletions

View File

@@ -1744,7 +1744,7 @@ def Test_expr7_call()
assert_equal('yes', 'yes'->Echo())
assert_equal('yes', 'yes'
->s:Echo4Arg())
assert_equal(1, !range(5)->empty())
assert_equal(true, !range(5)->empty())
assert_equal([0, 1, 2], --3->range())
call CheckDefFailure(["let x = 'yes'->Echo"], 'E107:')
@@ -1782,6 +1782,9 @@ def Test_expr7_not()
assert_equal(true, !test_void())
assert_equal(true, !test_unknown())
assert_equal(false, ![1, 2, 3]->reverse())
assert_equal(true, ![]->reverse())
END
CheckDefSuccess(lines)
CheckScriptSuccess(['vim9script'] + lines)