]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/emacs-lisp/comp-cstr.el (comp--normalize-typeset0): Fix comment.
authorAndrea Corallo <acorallo@gnu.org>
Wed, 20 Mar 2024 10:49:32 +0000 (11:49 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 24 Mar 2024 14:13:43 +0000 (15:13 +0100)
(cherry picked from commit e8d2bc75314262d512d367c270c6d43201ef533f)

lisp/emacs-lisp/comp-cstr.el

index 70456a70de1be6496c3ed2ee67523754aa65e90d..cbfb9540f03094539f34542e24b92b5dfb0c0ba9 100644 (file)
@@ -288,13 +288,10 @@ Return them as multiple value."
                             (apply #'append
                                    (mapcar #'comp--direct-supertypes typeset)))
                 for subs = (comp--direct-subtypes sup)
-                when (and (length> subs 1) ;;FIXME: Why?
-                          ;; Every subtype of `sup` is a subtype of
-                          ;; some element of `typeset`?
-                          ;; It's tempting to just check (member x typeset),
-                          ;; but think of the typeset (marker number),
-                          ;; where `sup' is `integer-or-marker' and `sub'
-                          ;; is `integer'.
+                when (and (length> subs 1) ;; If there's only one sub do
+                                           ;; nothing as we want to
+                                           ;; return the most specific
+                                           ;; type.
                           (cl-every (lambda (sub)
                                       (cl-some (lambda (type)
                                                  (comp-subtype-p sub type))