mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
Couple of `comp-cstr-union-1-no-mem' improvements for mixed neg pos union
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-1-no-mem): Generalize disjoint pos types vs neg values conditions. (comp-cstr-union-1-no-mem): Do not propagate ranges when we are already returning integer as generic type. * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-typespec-tests-alist): Add corresponding tests.
This commit is contained in:
parent
09ec39e352
commit
ac40a60696
2 changed files with 28 additions and 11 deletions
|
|
@ -81,7 +81,7 @@
|
|||
((not symbol) . (not symbol))
|
||||
((or (member foo) (not (member foo bar))) . (not (member bar)))
|
||||
((or (member foo bar) (not (member foo))) . t)
|
||||
;; Intentionally conservative, see `comp-cstr-union'.
|
||||
;; Intentionally conservative, see `comp-cstr-union-1-no-mem'.
|
||||
((or symbol (not sequence)) . t)
|
||||
((or symbol (not symbol)) . t)
|
||||
;; Conservative.
|
||||
|
|
@ -98,7 +98,10 @@
|
|||
((or (member foo) (not string)) . (not string))
|
||||
((or (not (integer 1 2)) integer) . integer)
|
||||
((or (not (integer 1 2)) (not integer)) . (not integer))
|
||||
((or (integer 1 2) (not integer)) . (not (or integer (integer * 0) (integer 3 *)))))
|
||||
((or (integer 1 2) (not integer)) . (not (or integer (integer * 0) (integer 3 *))))
|
||||
((or number (not (integer 1 2))) . t)
|
||||
((or atom (not (integer 1 2))) . t)
|
||||
((or atom (not (member foo))) . t))
|
||||
"Alist type specifier -> expected type specifier.")
|
||||
|
||||
(defmacro comp-cstr-synthesize-tests ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue