aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2020-12-26 13:09:24 +0100
committerAndrea Corallo2020-12-26 20:00:01 +0100
commitd8939520535224ccee663bba5b3da752f1648009 (patch)
treefb06309421c26e0d785f1acdabe551962d35db29
parentfc02c8458d636e682b079a68f2ee7347e0299132 (diff)
downloademacs-d8939520535224ccee663bba5b3da752f1648009.tar.gz
emacs-d8939520535224ccee663bba5b3da752f1648009.zip
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."
366 "Support range comparison functions." 366 "Support range comparison functions."
367 (with-comp-cstr-accessors 367 (with-comp-cstr-accessors
368 (if ext-range 368 (if ext-range
369 (setf (typeset dst) () 369 (setf (typeset dst) (and (typeset old-dst) '(float))
370 (valset dst) () 370 (valset dst) ()
371 (range dst) (if (range old-dst) 371 (range dst) (if (range old-dst)
372 (comp-range-intersection (range old-dst) 372 (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."
953 ((defun comp-tests-ret-type-spec-f (x) 953 ((defun comp-tests-ret-type-spec-f (x)
954 (when (> x 3) 954 (when (> x 3)
955 x)) 955 x))
956 (or null (integer 4 *))) 956 (or null float (integer 4 *)))
957 957
958 ;; 23 958 ;; 23
959 ((defun comp-tests-ret-type-spec-f (x) 959 ((defun comp-tests-ret-type-spec-f (x)
960 (when (>= x 3) 960 (when (>= x 3)
961 x)) 961 x))
962 (or null (integer 3 *))) 962 (or null float (integer 3 *)))
963 963
964 ;; 24 964 ;; 24
965 ((defun comp-tests-ret-type-spec-f (x) 965 ((defun comp-tests-ret-type-spec-f (x)
966 (when (< x 3) 966 (when (< x 3)
967 x)) 967 x))
968 (or null (integer * 2))) 968 (or null float (integer * 2)))
969 969
970 ;; 25 970 ;; 25
971 ((defun comp-tests-ret-type-spec-f (x) 971 ((defun comp-tests-ret-type-spec-f (x)
972 (when (<= x 3) 972 (when (<= x 3)
973 x)) 973 x))
974 (or null (integer * 3))) 974 (or null float (integer * 3)))
975 975
976 ;; 26 976 ;; 26
977 ((defun comp-tests-ret-type-spec-f (x) 977 ((defun comp-tests-ret-type-spec-f (x)
978 (when (> 3 x) 978 (when (> 3 x)
979 x)) 979 x))
980 (or null (integer * 2))) 980 (or null float (integer * 2)))
981 981
982 ;; 27 982 ;; 27
983 ((defun comp-tests-ret-type-spec-f (x) 983 ((defun comp-tests-ret-type-spec-f (x)
984 (when (>= 3 x) 984 (when (>= 3 x)
985 x)) 985 x))
986 (or null (integer * 3))) 986 (or null float (integer * 3)))
987 987
988 ;; 28 988 ;; 28
989 ((defun comp-tests-ret-type-spec-f (x) 989 ((defun comp-tests-ret-type-spec-f (x)
990 (when (< 3 x) 990 (when (< 3 x)
991 x)) 991 x))
992 (or null (integer 4 *))) 992 (or null float (integer 4 *)))
993 993
994 ;; 29 994 ;; 29
995 ((defun comp-tests-ret-type-spec-f (x) 995 ((defun comp-tests-ret-type-spec-f (x)
996 (when (<= 3 x) 996 (when (<= 3 x)
997 x)) 997 x))
998 (or null (integer 3 *))) 998 (or null float (integer 3 *)))
999 999
1000 ;; 30 1000 ;; 30
1001 ((defun comp-tests-ret-type-spec-f (x) 1001 ((defun comp-tests-ret-type-spec-f (x)
1002 (let ((y 3)) 1002 (let ((y 3))
1003 (when (> x y) 1003 (when (> x y)
1004 x))) 1004 x)))
1005 (or null (integer 4 *))) 1005 (or null float (integer 4 *)))
1006 1006
1007 ;; 31 1007 ;; 31
1008 ((defun comp-tests-ret-type-spec-f (x) 1008 ((defun comp-tests-ret-type-spec-f (x)
1009 (let ((y 3)) 1009 (let ((y 3))
1010 (when (> y x) 1010 (when (> y x)
1011 x))) 1011 x)))
1012 (or null (integer * 2))) 1012 (or null float (integer * 2)))
1013 1013
1014 ;; 32 1014 ;; 32
1015 ((defun comp-tests-ret-type-spec-f (x) 1015 ((defun comp-tests-ret-type-spec-f (x)
1016 (when (and (> x 3) 1016 (when (and (> x 3)
1017 (< x 10)) 1017 (< x 10))
1018 x)) 1018 x))
1019 (or null (integer 4 9))) 1019 (or null float (integer 4 9)))
1020 1020
1021 ;; 33 1021 ;; 33
1022 ((defun comp-tests-ret-type-spec-f (x) 1022 ((defun comp-tests-ret-type-spec-f (x)
1023 (when (or (> x 3) 1023 (when (or (> x 3)
1024 (< x 10)) 1024 (< x 10))
1025 x)) 1025 x))
1026 (or null integer)) 1026 (or null float integer))
1027 1027
1028 ;; 34 1028 ;; 34
1029 ((defun comp-tests-ret-type-spec-f (x) 1029 ((defun comp-tests-ret-type-spec-f (x)
1030 (when (or (< x 3) 1030 (when (or (< x 3)
1031 (> x 10)) 1031 (> x 10))
1032 x)) 1032 x))
1033 (or null (integer * 2) (integer 11 *))) 1033 (or null float (integer * 2) (integer 11 *)))
1034 1034
1035 ;; 35 No float range support. 1035 ;; 35 No float range support.
1036 ((defun comp-tests-ret-type-spec-f (x) 1036 ((defun comp-tests-ret-type-spec-f (x)