On Tue, Aug 26, 2003 at 06:08:56PM +0400, Alexey Dejneka wrote:
> William Harold Newman <wnewman@...> writes:
> > +279: type propagation error -- correctly inferred type goes astray?
> > + In sbcl-0.8.3 and sbcl-0.8.1.47, the warning
> > + The binding of ABS-FOO is a (VALUES (INTEGER 0 0)
> > + &OPTIONAL), not a (INTEGER 1 536870911)
> > + is emitted when compiling this file:
> > + (declaim (ftype (function ((integer 0 #.most-positive-fixnum))
> > + (integer #.most-negative-fixnum 0))
> > + foo))
> > + (defun foo (x)
> > + (- x))
> > + (defun bar (x)
> > + (let* (;; Uncomment this for a type mismatch warning indicating
> > + ;; that the type of (FOO X) is correctly understood.
> > + #+nil (fs-foo (float-sign (foo x)))
> > + ;; Uncomment this for a type mismatch warning
> > + ;; indicating that the type of (ABS (FOO X)) is
> > + ;; correctly understood.
> > + #+nil (fs-abs-foo (float-sign (abs (foo x))))
> > + ;; something wrong with this one though
> > + (abs-foo (abs (foo x))))
> > + (declare (type (integer 1 100) abs-foo))
> > + (print abs-foo)))
> A new test case for our loving bug 117 :-/ What is worse, the branch
> returning 0 can really be executed.
Aha! Thank you. I was so confident it was some sort of bug in type
inference that I spent quite a while with TRACE TYPE-INTERSECTION and
stuff before saying "screw it" and logging it as a bug. Bug 117 does
make more sense.
William Harold Newman <william.newman@...>
Sweeping the stones off the board is also an internationally understood
way of resigning.;-)
-- Bill Spight, in <http://senseis.xmp.net/?TheArtOfResignation>
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C