;; "simple" for now.
(give-up))
+ ;; When every neg type is a subtype of some pos one.
+ ;; In case return pos.
+ (when (and (typeset neg)
+ (cl-every (lambda (x)
+ (cl-some (lambda (y)
+ (comp-subtype-p x y))
+ (append (typeset pos)
+ (when (range pos)
+ '(integer)))))
+ (typeset neg)))
+ (setf (typeset dst) (typeset pos)
+ (valset dst) (valset pos)
+ (range dst) (range pos)
+ (neg dst) nil)
+ (cl-return-from comp-cstr-union-1-no-mem dst))
+
;; Verify disjoint condition between positive types and
;; negative types coming from values, in case give-up.
(let ((neg-value-types (nconc (mapcar #'type-of (valset neg))
;; 83
((not t) . nil)
;; 84
- ((not nil) . t))
+ ((not nil) . t)
+ ;; 85
+ ((or (not string) t) . t))
"Alist type specifier -> expected type specifier."))
(defmacro comp-cstr-synthesize-tests ()
eshell-term eshell-unix))
sym)))
+(defun comp-test-45635-f (&rest args)
+ ;; Reduced from `set-face-attribute'.
+ (let ((spec args)
+ family)
+ (while spec
+ (cond ((eq (car spec) :family)
+ (setq family (cadr spec))))
+ (setq spec (cddr spec)))
+ (when (and (stringp family)
+ (string-match "\\([^-]*\\)-\\([^-]*\\)" family))
+ (setq family (match-string 2 family)))
+ (when (or (stringp family)
+ (eq family 'unspecified))
+ family)))
+
\f
;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests ;;
<https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-01/msg00029.html>."
(should (eq (comp-test-45576-f) 'eval)))
+(comp-deftest 45635-1 ()
+ "<https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-01/msg00158.html>."
+ (should (string= (comp-test-45635-f :height 180 :family "PragmataPro Liga")
+ "PragmataPro Liga")))
+
\f
;;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests. ;;