(lp#569404)
* bug fix: RANDOM-STATE can be printed readably again.
* bug fix: Unreadable objects were sometimes printed like #<\nFoo>.
+ * bug fix: Using EQL with non-constant values of constant type (e.g. EQL
+ types) could result in type mismatches during compilation.
changes in sbcl-1.0.37 relative to sbcl-1.0.36:
* enhancement: Backtrace from THROW to uncaught tag on x86oids now shows
(var2
(add 'eql var1 var2 nil))
((constant-lvar-p arg2)
- (add 'eql var1 (ref-leaf (principal-lvar-use arg2))
+ (add 'eql var1
+ (let ((use (principal-lvar-use arg2)))
+ (if (ref-p use)
+ (ref-leaf use)
+ (find-constant (lvar-value arg2))))
nil))
(t
(add-test-constraint 'typep var1 (lvar-type arg2)
(setf *mystery* :mystery)
(assert (eq :ok (test-mystery (make-thing :slot :mystery))))
+;;; Singleton types can also be constant.
+(test-util:with-test (:name :propagate-singleton-types-to-eql)
+ (macrolet ((test (type value &aux (fun (gensym "FUN")))
+ `(progn
+ (declaim (ftype (function () (values ,type &optional)) ,fun))
+ (defun ,fun ()
+ ',value)
+ (lambda (x)
+ (if (eql x (,fun))
+ nil
+ (eql x (,fun)))))))
+ (values
+ (test (eql foo) foo)
+ (test (integer 0 0) 0)
+ (test (double-float 0d0 0d0) 0d0)
+ (test (eql #\c) #\c))))
+
;;; success
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.37.72"
+"1.0.37.73"