Method override not correctly implemented
Created by: reiniervandijk
Consider:
(define-object A (base-object)
:objects
((child :type 'B)))
(define-object B (base-object)
:objects
((child :type 'C)))
(define-object C (D)
:computed-slots
((hoi (list 3 4 5))))
(define-object D (base-object)
:objects
((hoi :type (if (/ 0 0) 'null-part 'C))
(dag :type (if (/ 0 0) 'null-part 'C))))
If you evaluate:
(make-self 'A)
(the child child %object-keywords%)
you'll see the problem.
Strange because this is correct:
(gdl::computed-slots (find-class 'C))
;; (gdl-acc::hoi)
(gdl::objects (find-class 'C))
;; nil
(gdl::objects (find-class 'D))
;; (gdl-acc::hoi gdl-acc::dag)
However, looking closer at an instance level (retrieved from macro-expansion):
(defmethod gdl-rule::%object-keywords% ((#:g1211 C)) (remove-duplicates (append 'nil 'nil (when (next-method-p) (call-next-method)))))
You see that the next-method is invoked, that leads to class D (as superclass of C). I guess that this a bit naive.
Imported comments:
By genworks on 2013-10-29 16:46:03 UTC
This is indeed nasty and we welcome the report, but the behavior as described is affecting only internal, undocumented messages. The bug manifests itself in #153 (closed), which does affect documented/supported functionality, so the proposed fix will be posted there, and this issue is being closed.