mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* Fix union constraint for mixed pos/neg constraints
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem): Fix neg type shadowing pos values. * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-typespec-tests-alist): Add testcase. * test/src/comp-tests.el (comp-tests-type-spec-tests): Fix testcase.
This commit is contained in:
parent
da4da88c76
commit
d6227f6edc
3 changed files with 10 additions and 2 deletions
|
|
@ -597,6 +597,12 @@ DST is returned."
|
||||||
(valset pos)))
|
(valset pos)))
|
||||||
;; Pos is a superset of neg.
|
;; Pos is a superset of neg.
|
||||||
(give-up))
|
(give-up))
|
||||||
|
((cl-some (lambda (x)
|
||||||
|
(cl-some (lambda (y)
|
||||||
|
(comp-subtype-p y x))
|
||||||
|
(mapcar #'type-of (valset pos))))
|
||||||
|
(typeset neg))
|
||||||
|
(give-up))
|
||||||
(t
|
(t
|
||||||
;; pos is a subset or eq to neg
|
;; pos is a subset or eq to neg
|
||||||
(setf (valset neg)
|
(setf (valset neg)
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,9 @@
|
||||||
;; 85
|
;; 85
|
||||||
((or (not string) t) . t)
|
((or (not string) t) . t)
|
||||||
;; 86
|
;; 86
|
||||||
((or (not vector) sequence) . sequence))
|
((or (not vector) sequence) . sequence)
|
||||||
|
;; 87
|
||||||
|
((or (not symbol) null) . t))
|
||||||
"Alist type specifier -> expected type specifier."))
|
"Alist type specifier -> expected type specifier."))
|
||||||
|
|
||||||
(defmacro comp-cstr-synthesize-tests ()
|
(defmacro comp-cstr-synthesize-tests ()
|
||||||
|
|
|
||||||
|
|
@ -1185,7 +1185,7 @@ Return a list of results."
|
||||||
((defun comp-tests-ret-type-spec-f (x)
|
((defun comp-tests-ret-type-spec-f (x)
|
||||||
(unless (symbolp x)
|
(unless (symbolp x)
|
||||||
x))
|
x))
|
||||||
(not symbol))
|
t)
|
||||||
|
|
||||||
;; 55
|
;; 55
|
||||||
((defun comp-tests-ret-type-spec-f (x)
|
((defun comp-tests-ret-type-spec-f (x)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue