diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-12-02 23:49:00 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-12-05 19:01:03 +0100 |
commit | 726e40fb7c0eb50e6afe831997da445c32872eed (patch) | |
tree | 7312b3ea8d911029b9552e54558fa835dc590f94 /lisp/emacs-lisp | |
parent | cbbdb4e1993ffa0f9e467d8c2a6f86403bb6d675 (diff) | |
download | emacs-726e40fb7c0eb50e6afe831997da445c32872eed.tar.gz emacs-726e40fb7c0eb50e6afe831997da445c32872eed.tar.bz2 emacs-726e40fb7c0eb50e6afe831997da445c32872eed.zip |
Fix union of homogeneously negated input constraints
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1): Fix logic.
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add a couple of tests.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp-cstr.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index 96aa67ec9d7..3aad3dc2c24 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el @@ -325,6 +325,8 @@ DST is returned." finally (when (or (zerop n-pos) (zerop n-neg)) (apply #'comp-cstr-union-homogeneous dst srcs) + (when (zerop n-pos) + (setf (neg dst) t)) (cl-return-from comp-cstr-union-1 dst))) ;; Some are negated and some are not |