Commit 771fd903 authored by Raymond Toy's avatar Raymond Toy

Merge branch 'rtoy-fix-issue-58' into 'master'

Fix #58: Bogus type error in comparison of complex number with `THE` form

Closes #58

See merge request !37
parents 31c6bf9f bccd6a98
Pipeline #289 passed with stage
in 9 minutes and 20 seconds
......@@ -1903,7 +1903,7 @@
(deftransform upgraded-complex-real-contagion-arg1 ((x y) * * :defun-only t :node node)
;;(format t "upgraded-complex-real-contagion-arg1~%")
`(,(continuation-function-name (basic-combination-fun node))
(coerce x '(complex ,(type-specifier (continuation-type y))))
(coerce x '(complex ,(numeric-type-format (continuation-type y))))
y))
;;;
(deftransform upgraded-complex-real-contagion-arg2 ((x y) * * :defun-only t :node node)
......@@ -1912,7 +1912,7 @@
(continuation-type x) (continuation-type y))
`(,(continuation-function-name (basic-combination-fun node))
x
(coerce y '(complex ,(type-specifier (continuation-type x))))))
(coerce y '(complex ,(numeric-type-format (continuation-type x))))))
(dolist (x '(= + * / -))
......
......@@ -34,6 +34,7 @@ public domain.
* ~~#47~~ Backquate and multiple splices
* ~~#59~~ Incorrect type-derivation for `decode-float`
* ~~#60~~ The function `C::%UNARY-FROUND` is undefined
* ~~#58~~ Bogus type error in comparison of complex number with `THE` form
* Other changes:
* Improvements to the PCL implementation of CLOS:
* Changes to building procedure:
......
......@@ -515,3 +515,9 @@
(assert-equalp
(values 2d0 0d0)
(funcall c14 2d0))))
(define-test issue.58
(:tag :issues)
(let ((c9 (compile nil #'(lambda (x)
(= (the (eql 1.0d0) x) #c(1/2 1/2))))))
(assert-false (funcall c9 1.d0))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment