summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/comp-cstr.el9
-rw-r--r--test/lisp/emacs-lisp/comp-cstr-tests.el6
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 3f3f4f61451..cd8f432412c 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -598,6 +598,15 @@ DST is returned."
(valset dst) (valset neg)
(range dst) (range neg)
(neg dst) t)
+
+ ;; (not t) => nil
+ (when (and (null (valset dst))
+ (null (range dst))
+ (neg dst)
+ (equal '(t) (typeset dst)))
+ (setf (typeset dst) ()
+ (neg dst) nil))
+
(cl-return-from comp-cstr-intersection-no-mem dst))
(when (cl-some
diff --git a/test/lisp/emacs-lisp/comp-cstr-tests.el b/test/lisp/emacs-lisp/comp-cstr-tests.el
index 03bf78968f2..f7ea00e86f2 100644
--- a/test/lisp/emacs-lisp/comp-cstr-tests.el
+++ b/test/lisp/emacs-lisp/comp-cstr-tests.el
@@ -195,7 +195,11 @@
;; 77
((and (or symbol string) (or number marker)) . nil)
;; 78
- ((and t t) . t))
+ ((and t t) . t)
+ ;; 80
+ ((and (or marker number) (integer 0 0)) . (integer 0 0))
+ ;; 81
+ ((and t (not t)) . nil))
"Alist type specifier -> expected type specifier.")
(defmacro comp-cstr-synthesize-tests ()