Fix type of `zero?' to properly handle 0.0.
This commit is contained in:
parent
1a80b6b044
commit
7ece2a4872
|
@ -807,6 +807,7 @@
|
||||||
(vector-ref #("a" "b") (sub1 x))
|
(vector-ref #("a" "b") (sub1 x))
|
||||||
(vector-ref #("a" "b") (- x 1)))
|
(vector-ref #("a" "b") (- x 1)))
|
||||||
-String]
|
-String]
|
||||||
|
[tc-err (string-append "bar" (if (zero? (ann 0.0 Float)) #f "foo"))]
|
||||||
)
|
)
|
||||||
(test-suite
|
(test-suite
|
||||||
"check-type tests"
|
"check-type tests"
|
||||||
|
|
|
@ -41,7 +41,8 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
;; numeric predicates
|
;; 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)]
|
[number? (make-pred-ty N)]
|
||||||
[integer? (asym-pred Univ B (-FS (-filter (Un -Integer -Flonum) 0)
|
[integer? (asym-pred Univ B (-FS (-filter (Un -Integer -Flonum) 0)
|
||||||
(-not-filter -Integer 0)))]
|
(-not-filter -Integer 0)))]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user