"Method objects cannot be redefined by ~S.")
(def change-class ((method method) new &rest initargs)
"Method objects cannot be redefined by ~S.")
- ;; FIXME: NEW being a subclass of METHOD.
+ ;; NEW being a subclass of method is dealt with in the general
+ ;; method of CHANGE-CLASS
(def update-instance-for-redefined-class ((method method) added discarded
plist &rest initargs)
"No behaviour specified for ~S on method objects.")
(apply #'update-instance-for-different-class copy instance initargs)
instance))
-(defmethod change-class ((instance standard-object)
- (new-class standard-class)
+(defmethod change-class ((instance standard-object) (new-class standard-class)
&rest initargs)
+ (let ((cpl (class-precedence-list new-class)))
+ (when (member (find-class 'method) cpl)
+ (error 'metaobject-initialization-violation
+ :format-control "~@<Cannot ~S objects into ~S metaobjects.~@:>"
+ :format-arguments (list 'change-class 'method)
+ :references (list '(:amop :initialization "Method")))))
(change-class-internal instance new-class initargs))
(defmethod change-class ((instance funcallable-standard-object)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.6.32"
+"0.9.6.33"