summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-12-26 13:09:24 +0100
committerAndrea Corallo <akrl@sdf.org>2020-12-26 20:00:01 +0100
commitd8939520535224ccee663bba5b3da752f1648009 (patch)
treefb06309421c26e0d785f1acdabe551962d35db29
parentfc02c8458d636e682b079a68f2ee7347e0299132 (diff)
downloademacs-d8939520535224ccee663bba5b3da752f1648009.tar.gz
Fix missing float handling into `comp-cstr-set-cmp-range'
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range): Add float handling. * test/src/comp-tests.el (comp-tests-type-spec-tests): Update results.
-rw-r--r--lisp/emacs-lisp/comp-cstr.el2
-rw-r--r--test/src/comp-tests.el26
2 files changed, 14 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 9d0c67177b2..1927207db63 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -366,7 +366,7 @@ Return them as multiple value."
"Support range comparison functions."
(with-comp-cstr-accessors
(if ext-range
- (setf (typeset dst) ()
+ (setf (typeset dst) (and (typeset old-dst) '(float))
(valset dst) ()
(range dst) (if (range old-dst)
(comp-range-intersection (range old-dst)
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index e1c13598ad6..446c30666f0 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -953,84 +953,84 @@ Return a list of results."
((defun comp-tests-ret-type-spec-f (x)
(when (> x 3)
x))
- (or null (integer 4 *)))
+ (or null float (integer 4 *)))
;; 23
((defun comp-tests-ret-type-spec-f (x)
(when (>= x 3)
x))
- (or null (integer 3 *)))
+ (or null float (integer 3 *)))
;; 24
((defun comp-tests-ret-type-spec-f (x)
(when (< x 3)
x))
- (or null (integer * 2)))
+ (or null float (integer * 2)))
;; 25
((defun comp-tests-ret-type-spec-f (x)
(when (<= x 3)
x))
- (or null (integer * 3)))
+ (or null float (integer * 3)))
;; 26
((defun comp-tests-ret-type-spec-f (x)
(when (> 3 x)
x))
- (or null (integer * 2)))
+ (or null float (integer * 2)))
;; 27
((defun comp-tests-ret-type-spec-f (x)
(when (>= 3 x)
x))
- (or null (integer * 3)))
+ (or null float (integer * 3)))
;; 28
((defun comp-tests-ret-type-spec-f (x)
(when (< 3 x)
x))
- (or null (integer 4 *)))
+ (or null float (integer 4 *)))
;; 29
((defun comp-tests-ret-type-spec-f (x)
(when (<= 3 x)
x))
- (or null (integer 3 *)))
+ (or null float (integer 3 *)))
;; 30
((defun comp-tests-ret-type-spec-f (x)
(let ((y 3))
(when (> x y)
x)))
- (or null (integer 4 *)))
+ (or null float (integer 4 *)))
;; 31
((defun comp-tests-ret-type-spec-f (x)
(let ((y 3))
(when (> y x)
x)))
- (or null (integer * 2)))
+ (or null float (integer * 2)))
;; 32
((defun comp-tests-ret-type-spec-f (x)
(when (and (> x 3)
(< x 10))
x))
- (or null (integer 4 9)))
+ (or null float (integer 4 9)))
;; 33
((defun comp-tests-ret-type-spec-f (x)
(when (or (> x 3)
(< x 10))
x))
- (or null integer))
+ (or null float integer))
;; 34
((defun comp-tests-ret-type-spec-f (x)
(when (or (< x 3)
(> x 10))
x))
- (or null (integer * 2) (integer 11 *)))
+ (or null float (integer * 2) (integer 11 *)))
;; 35 No float range support.
((defun comp-tests-ret-type-spec-f (x)