Mercurial > vim
diff src/testdir/test_vim9_expr.vim @ 31549:6f1cbee3d652 v9.0.1107
patch 9.0.1107: float constant not recognized as float
Commit: https://github.com/vim/vim/commit/73ade49c4b692e77d2c0b2ef0afbedbf55c5f946
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 27 20:54:41 2022 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 27 Dec 2022 22:00:05 +0100 |
parents | 1a32f1a4f823 |
children | 67d9fbe516a3 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -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