Changeset 14347


Ignore:
Timestamp:
01/05/13 18:39:28 (11 years ago)
Author:
rschlatte
Message:

defer checking for lambda list congruence.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r14346 r14347  
    38443844  (apply #'std-after-reinitialization-for-classes class all-keys))
    38453845
     3846(defmethod reinitialize-instance :before ((gf standard-generic-function)
     3847                                          &key
     3848                                            (lambda-list nil lambda-list-supplied-p)
     3849                                          &allow-other-keys)
     3850  (when lambda-list-supplied-p
     3851    (unless (or (null (generic-function-methods gf))
     3852                (lambda-lists-congruent-p lambda-list
     3853                                          (generic-function-lambda-list gf)))
     3854      (error "The lambda list ~S is incompatible with the existing methods of ~S."
     3855             lambda-list gf))))
     3856
    38463857(defmethod reinitialize-instance :after ((gf standard-generic-function)
    38473858                                         &rest all-keys)
     
    44324443     &rest all-keys
    44334444     &key (generic-function-class (class-of generic-function))
    4434      (lambda-list nil lambda-list-supplied-p)
    44354445     (method-class (generic-function-method-class generic-function))
    44364446     (method-combination (generic-function-method-combination generic-function))
     
    44444454    (error "The class ~S is incompatible with the existing class (~S) of ~S."
    44454455           generic-function-class (class-of generic-function) generic-function))
    4446   (when lambda-list-supplied-p
    4447     (unless (or (null (generic-function-methods generic-function))
    4448                 (lambda-lists-congruent-p lambda-list
    4449                                           (generic-function-lambda-list generic-function)))
    4450       (error "The lambda list ~S is incompatible with the existing methods of ~S."
    4451              lambda-list generic-function)))
    4452   (unless (or (null (generic-function-methods generic-function))
    4453               (eq method-class (generic-function-method-class generic-function)))
    4454     (error "The method class ~S is incompatible with the existing methods of ~S."
    4455            method-class generic-function))
     4456  ;; We used to check for changes in method class here, but CLHS says:
     4457  ;; "If function-name specifies a generic function that has a different
     4458  ;; value for the :method-class argument, the value is changed, but any
     4459  ;; existing methods are not changed."
    44564460  (unless (typep method-combination 'method-combination)
    44574461    (setf method-combination
Note: See TracChangeset for help on using the changeset viewer.