1
0
forked from aniani/vim

patch 9.0.1107: float constant not recognized as float

Problem:    Float constant not recognized as float.
Solution:   Check the vartype instead of comparing with t_float.
            (closes #11754)
This commit is contained in:
Bram Moolenaar
2022-12-27 20:54:41 +00:00
parent 09ce0b8e11
commit 73ade49c4b
3 changed files with 13 additions and 12 deletions

View File

@@ -2045,6 +2045,13 @@ def Test_expr9_number()
assert_equal(6, 0x6)
assert_equal(15, 0xf)
assert_equal(255, 0xff)
const INFTY = 1.0 / 0.0
def Test()
assert_equal(1, isinf(INFTY))
assert_equal(-1, isinf(-INFTY))
enddef
Test()
END
v9.CheckDefAndScriptSuccess(lines)
enddef