0.9.15.25: COMPILE-FILE-PATHNAME when output-file doesn't have a type
[sbcl.git] / src / code / late-type.lisp
index 102c8b5..b2717e4 100644 (file)
          ;; those types can be other types in disguise.  So we'd
          ;; better delegate.
          (invoke-complex-subtypep-arg1-method type1 type2))
+        ((and (or (eq type2 *instance-type*)
+                  (eq type2 *funcallable-instance-type*))
+              (member-type-p type1))
+         ;; member types can be subtypep INSTANCE and
+         ;; FUNCALLABLE-INSTANCE in surprising ways.
+         (invoke-complex-subtypep-arg1-method type1 type2))
         ((and (eq type2 *instance-type*) (classoid-p type1))
          (if (member type1 *non-instance-classoid-types* :key #'find-classoid)
              (values nil t)
                  type1
                  nil)
              *empty-type*)
-         (if (type-might-contain-other-types-p type1)
+         (if (or (type-might-contain-other-types-p type1)
+                 (member-type-p type1))
              nil
              *empty-type*)))
     ((eq type2 *funcallable-instance-type*)
                  nil))
          (if (fun-type-p type1)
              nil
-             (if (type-might-contain-other-types-p type1)
+             (if (or (type-might-contain-other-types-p type1)
+                     (member-type-p type1))
                  nil
                  *empty-type*))))
     (t (hierarchical-intersection2 type1 type2))))