type inferencing failure on (* float t) SBCL 2.0.9
Bug #1914094 reported by
Andrew Berkley
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(declaim (ftype (function (fixnum) (values fixnum)) blarg))
(defun blarg (n)
(declare (type fixnum n))
n)
(defun does-not-
(blarg (* 3f0 x)))
(defun does-warn-
(declare (type fixnum x))
(blarg (* 3f0 x)))
The result of the multiply should be (or float (complex float)) which does not intersect fixnum. Instead we get type number (I think) because we end up with generic numeric-contagion?
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
While fixing this I found what looks like a bug in https:/ /github. com/sbcl/ sbcl/commit/ eb3307177a80c12 4f233d21ca9087f ea63c39019# diff-7167278518 12af3d6d0a0b227 549af70c133e608 0bd085d52fa939a 25f5b4515
at line 373 of early-type.lisp, (specifier-type 'real) should be (specifier-type 'float)