Changeset 14348


Ignore:
Timestamp:
01/06/13 07:45:29 (8 years ago)
Author:
Mark Evenson
Message:

Backport r14347 | rschlatte | 2013-01-05 19:39:28 +0100 (Sat, 05 Jan 2013) | 3 lines

defer checking for lambda list congruence.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1.x/src/org/armedbear/lisp/clos.lisp

    r14345 r14348  
    39713971  (apply #'std-after-reinitialization-for-classes class all-keys))
    39723972
     3973(defmethod reinitialize-instance :before ((gf standard-generic-function)
     3974                                          &key
     3975                                            (lambda-list nil lambda-list-supplied-p)
     3976                                          &allow-other-keys)
     3977  (when lambda-list-supplied-p
     3978    (unless (or (null (generic-function-methods gf))
     3979                (lambda-lists-congruent-p lambda-list
     3980                                          (generic-function-lambda-list gf)))
     3981      (error "The lambda list ~S is incompatible with the existing methods of ~S."
     3982             lambda-list gf))))
     3983
    39733984(defmethod reinitialize-instance :after ((gf standard-generic-function)
    39743985                                         &rest all-keys)
     
    45594570     &rest all-keys
    45604571     &key (generic-function-class (class-of generic-function))
    4561      (lambda-list nil lambda-list-supplied-p)
    45624572     (method-class (generic-function-method-class generic-function))
    45634573     (method-combination (generic-function-method-combination generic-function))
     
    45714581    (error "The class ~S is incompatible with the existing class (~S) of ~S."
    45724582           generic-function-class (class-of generic-function) generic-function))
    4573   (when lambda-list-supplied-p
    4574     (unless (or (null (generic-function-methods generic-function))
    4575                 (lambda-lists-congruent-p lambda-list
    4576                                           (generic-function-lambda-list generic-function)))
    4577       (error "The lambda list ~S is incompatible with the existing methods of ~S."
    4578              lambda-list generic-function)))
    4579   (unless (or (null (generic-function-methods generic-function))
    4580               (eq method-class (generic-function-method-class generic-function)))
    4581     (error "The method class ~S is incompatible with the existing methods of ~S."
    4582            method-class generic-function))
     4583  ;; We used to check for changes in method class here, but CLHS says:
     4584  ;; "If function-name specifies a generic function that has a different
     4585  ;; value for the :method-class argument, the value is changed, but any
     4586  ;; existing methods are not changed."
    45834587  (unless (typep method-combination 'method-combination)
    45844588    (setf method-combination
Note: See TracChangeset for help on using the changeset viewer.