;; DEFMETHOD
(sb-cltl2:macroexpand-all '(defmethod x (a) (macro))))
+(with-test (:name (:defmethod-undefined-function :bug-503095))
+ (flet ((test-load (file)
+ (let (implicit-gf-warning)
+ (handler-bind
+ ((sb-ext:implicit-generic-function-warning
+ (lambda (x)
+ (setf implicit-gf-warning x)
+ (muffle-warning x)))
+ ((or warning error) #'error))
+ (load file))
+ (assert implicit-gf-warning))))
+ (multiple-value-bind (fasl warnings errorsp) (compile-file "bug-503095.lisp")
+ (unwind-protect
+ (progn (assert (and fasl (not warnings) (not errorsp)))
+ (test-load fasl))
+ (and fasl (delete-file fasl))))
+ (test-load "bug-503095-2.lisp")))
+
+(with-test (:name :accessor-and-plain-method)
+ (defclass a-633911 ()
+ ((x-633911 :initform nil
+ :accessor x-633911)))
+
+ (defmethod x-633911 ((b a-633911)) 10)
+
+ (defclass b-633911 ()
+ ((x-633911 :initform nil
+ :accessor x-633911)))
+
+ (assert (= (x-633911 (make-instance 'a-633911)) 10)))
;;;; success