mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-25 05:51:55 -08:00
mop: fix bug in compute-applicable-methods-using-classes
Move computation of args-specializers from #'sort-applicable-methods up to #'std-compute-applicable-methods. Fix suggested by @costanza. Fixes #203.
This commit is contained in:
parent
491ec2fbf0
commit
7898553d6a
1 changed files with 5 additions and 4 deletions
|
|
@ -221,7 +221,9 @@
|
|||
;;; 3. Subclasses of specified classes preserve the slot order in ECL.
|
||||
;;;
|
||||
(defun std-compute-applicable-methods (gf args)
|
||||
(sort-applicable-methods gf (applicable-method-list gf args) args))
|
||||
(sort-applicable-methods gf
|
||||
(applicable-method-list gf args)
|
||||
(mapcar #'class-of args)))
|
||||
|
||||
(setf (fdefinition 'compute-applicable-methods) #'std-compute-applicable-methods)
|
||||
|
||||
|
|
@ -264,11 +266,10 @@
|
|||
classes)
|
||||
t))))
|
||||
|
||||
(defun sort-applicable-methods (gf applicable-list args)
|
||||
(defun sort-applicable-methods (gf applicable-list args-specializers)
|
||||
(declare (optimize (safety 0) (speed 3)))
|
||||
(with-early-accessors (+standard-method-slots+ +standard-generic-function-slots+)
|
||||
(let ((f (generic-function-a-p-o-function gf))
|
||||
(args-specializers (mapcar #'class-of args)))
|
||||
(let ((f (generic-function-a-p-o-function gf)))
|
||||
;; reorder args to match the precedence order
|
||||
(when f
|
||||
(setf args-specializers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue