#280: Additional slots in function classes screw up std-compute-discriminating- function -----------------------+---------------------------------------------------- Reporter: rschlatte | Owner: rschlatte Type: defect | Status: new Priority: major | Milestone: Component: (A)MOP | Version: Keywords: | -----------------------+---------------------------------------------------- Report by Pascal Costanza
Here is a test case: {{{ CL-USER(1): (use-package :mop) T CL-USER(2): (defclass my-function (standard-generic-function) ((a-slot :initarg :a-slot :accessor a-slot)) (:metaclass funcallable-standard-class)) #<FUNCALLABLE-STANDARD-CLASS MY-FUNCTION {24DF7EA4}> CL-USER(3): (defgeneric test (x y z) (:generic-function-class my-function)) #<THREAD "interpreter" {14BAAEA8}>: Debugger invoked on condition of type TYPE-ERROR The value TEST is not of type LIST. }}}
The reason is that std-compute-discriminating-function is also called for subclasses of standard-generic-function that don't override compute- discriminating function. The specialization in std-compute-discriminating- function should only occur if the passed function is _extactly_ a standard-generic-function (or if it doesn't add any slots on top of standard-generic-function).
By the way, we're getting closer (ha!). More and more test cases in my test suites work. I'm pretty confident that I can add full support for ABCL in Closer to MOP for the next version of ABCL.
#280: Additional slots in function classes screw up std-compute-discriminating- function ------------------------+--------------------------------------------------- Reporter: rschlatte | Owner: rschlatte Type: defect | Status: closed Priority: major | Milestone: Component: (A)MOP | Version: Resolution: fixed | Keywords: ------------------------+--------------------------------------------------- Changes (by rschlatte):
* status: new => closed * resolution: => fixed
Comment:
(In [14342]) Add new slots at the end in inherited classes
- Fixes #280 (reported by Pascal Costanza)
#280: Additional slots in function classes screw up std-compute-discriminating- function ------------------------+--------------------------------------------------- Reporter: rschlatte | Owner: rschlatte Type: defect | Status: closed Priority: major | Milestone: Component: (A)MOP | Version: Resolution: fixed | Keywords: ------------------------+---------------------------------------------------
Comment(by mevenson):
(In [14343]) Backport r14342 | rschlatte | 2012-12-23 16:19:32 +0100 (Sun, 23 Dec 2012) | 3 lines
Add new slots at the end in inherited classes
- Fixes #280 (reported by Pascal Costanza)
armedbear-ticket@common-lisp.net