Incorrect type error in code involving REPLACE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
(defun bug312 ()
(let* ((params
(list (coerce '(1 2 3 4) 'simple-vector)
(lam
`(lambda (p1 p2)
(apply (compile nil lam) params)))
(bug312) ==>
The value
(#C(3.0d0 5.0d0) 1/2)
is not of type
(CONS (MEMBER #C(-1.0d0 7.0d0)) T)
[Condition of type TYPE-ERROR]
This may be a bug in type simplification. Weirdly, the bug goes away if the complex numbers are #C(1.0 2.0d0) and #C(3.0d0 4.0d0).
x86-64, "2.4.0.
Changed in sbcl: | |
status: | New → Confirmed |
(type-union (specifier-type '(cons (complex (double-float 3.0d0 5.0d0))))
(specifier -type '(cons (complex (double-float -1.0d0 7.0d0)) null)))
produces some nonsense:
#<UNION-TYPE (OR (CONS (COMPLEX (DOUBLE-FLOAT 3.0d0 5.0d0)) T)
(CONS (OR (COMPLEX (DOUBLE-FLOAT -1.0d0 (3.0d0))) (COMPLEX (DOUBLE-FLOAT (5.0d0) 7.0d0))) NULL))>