1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Fix lower-bound saturation in type inference

* module/language/cps/types.scm (type-entry-saturating-union): Fix range
  saturation in the negative direction.  Previously we were artificially
  truncating negative range ends to zero.
This commit is contained in:
Andy Wingo 2016-03-14 11:17:08 +01:00
parent d236022eb0
commit 43a038f6e1

View file

@ -288,8 +288,8 @@
(b-min (type-entry-min b)))
(cond
((not (< b-min a-min)) a-min)
((> 0 b-min) 0)
((> &range-min b-min) &range-min)
((< 0 b-min) 0)
((< &range-min b-min) &range-min)
(else -inf.0)))
(let ((a-max (type-entry-max a))
(b-max (type-entry-max b)))