Fix type of `zero?' to properly handle 0.0.

original commit: 7ece2a4872bfd02d7b62b39c040e877c7ba638ee
This commit is contained in:
Sam Tobin-Hochstadt 2010-06-11 18:54:05 -04:00
parent aa6d48e80f
commit 79fe558827
2 changed files with 3 additions and 1 deletions

View File

@ -807,6 +807,7 @@
(vector-ref #("a" "b") (sub1 x))
(vector-ref #("a" "b") (- x 1)))
-String]
[tc-err (string-append "bar" (if (zero? (ann 0.0 Float)) #f "foo"))]
)
(test-suite
"check-type tests"

View File

@ -41,7 +41,8 @@
)
;; numeric predicates
[zero? (make-pred-ty (list N) B -Zero)]
[zero? (asym-pred N B (-FS (-filter (Un -Flonum -Zero) 0)
(-not-filter -Zero 0)))]
[number? (make-pred-ty N)]
[integer? (asym-pred Univ B (-FS (-filter (Un -Integer -Flonum) 0)
(-not-filter -Integer 0)))]