[CEDET-devel] Re: no-next-method in SemanticDB
Brought to you by:
zappo
From: drkm <dar...@ya...> - 2005-07-09 05:06:16
|
drkm writes: > I wrote a piece of code to see what it can look like. I don't know if it's related, but while I tested it, I found the following: (defclass C () ()) (defclass D (C) ()) (defmethod f ((c C)) (message "f(C): %s" c)) (defmethod f ((d D)) (message "f(D): %s" d) (call-next-method)) (f (make-instance 'D)) ==> No next method: D, f, (:PRIMARY), (D), "#<D D>" Here is the backtrace. But now, really, I can't investigate anymore. Debugger entered--Lisp error: (no-next-method D f (:PRIMARY) (D) "#<D D>") signal(no-next-method (D f (:PRIMARY) (D) "#<D D>")) eieio-generic-function([object eieio-standard-generic-function "eieio-standard-generic-function" f nil nil "Generically created method `f'"] [object eieio-standard-method "eieio-standard-method" (lambda (d) (message "f(D): %s" d) (call-next-method)) [object eieio-standard-generic-function "eieio-standard-generic-function" f nil nil "Generically created method `f'"] (D) (D) (:PRIMARY)] [object D "D"]) apply(eieio-generic-function (#1=[object eieio-standard-generic-function "eieio-standard-generic-function" f nil nil "Generically created method `f'"] [object eieio-standard-method "eieio-standard-method" (lambda ... ... ...) #1# (D) (D) (:PRIMARY)] [object D "D"])) (setq rval (apply (car ...) newargs)) (let ((scoped-class ...) (eieio-generic-call-key ...)) (setq found t) (setq rval (apply ... newargs))) (if (car lambdas) (let (... ...) (setq found t) (setq rval ...))) (while lambdas (if (car lambdas) (let ... ... ...)) (setq lambdas (cdr lambdas) keys (cdr keys))) (let ((rval nil) (found nil)) (while lambdas (if ... ...) (setq lambdas ... keys ...)) (if (not found) (if ... ... ...)) rval) (let ((newargs nil) (mclass nil) (lambdas nil) (tlambdas nil) (keys nil) (static nil) (eieio-generic-call-methodname method) (eieio-generic-call-arglst args) (firstarg nil)) (setq newargs args firstarg (car newargs)) (if (and ... ... ... ...) (load ...)) (cond (... ...) (... ...)) (when (object-p firstarg) (setq tlambdas ...) (setq lambdas ... keys ...) (setq tlambdas ...) (setq lambdas ... keys ...) (setq tlambdas ...) (setq lambdas ... keys ...)) (unless (find-if ... lambdas) (setq tlambdas ...) (setq lambdas ... keys ...)) (let (... ...) (while lambdas ... ...) (if ... ...) rval)) eieio-generic-call(no-next-method (#1=[object eieio-standard-generic-function "eieio-standard-generic-function" f nil nil "Generically created method `f'"] [object eieio-standard-method "eieio-standard-method" (lambda ... ... ...) #1# (D) (D) (:PRIMARY)] [object D "D"])) no-next-method([object eieio-standard-generic-function "eieio-standard-generic-function" f nil nil "Generically created method `f'"] [object eieio-standard-method "eieio-standard-method" (lambda (d) (message "f(D): %s" d) (call-next-method)) [object eieio-standard-generic-function "eieio-standard-generic-function" f nil nil "Generically created method `f'"] (D) (D) (:PRIMARY)] [object D "D"]) apply(no-next-method [object eieio-standard-generic-function "eieio-standard-generic-function" f nil nil "Generically created method `f'"] [object eieio-standard-method "eieio-standard-method" (lambda (d) (message "f(D): %s" d) (call-next-method)) [object eieio-standard-generic-function "eieio-standard-generic-function" f nil nil "Generically created method `f'"] (D) (D) (:PRIMARY)] [object D "D"]) no-next-method-trempoline(([object D "D"])) call-next-method() D([object D "D"]) apply(D [object D "D"]) (setq rval (apply (car ...) newargs)) (let ((scoped-class ...) (eieio-generic-call-key ...)) (setq found t) (setq rval (apply ... newargs))) (if (car lambdas) (let (... ...) (setq found t) (setq rval ...))) (while lambdas (if (car lambdas) (let ... ... ...)) (setq lambdas (cdr lambdas) keys (cdr keys))) (let ((rval nil) (found nil)) (while lambdas (if ... ...) (setq lambdas ... keys ...)) (if (not found) (if ... ... ...)) rval) (let ((newargs nil) (mclass nil) (lambdas nil) (tlambdas nil) (keys nil) (static nil) (eieio-generic-call-methodname method) (eieio-generic-call-arglst args) (firstarg nil)) (setq newargs args firstarg (car newargs)) (if (and ... ... ... ...) (load ...)) (cond (... ...) (... ...)) (when (object-p firstarg) (setq tlambdas ...) (setq lambdas ... keys ...) (setq tlambdas ...) (setq lambdas ... keys ...) (setq tlambdas ...) (setq lambdas ... keys ...)) (unless (find-if ... lambdas) (setq tlambdas ...) (setq lambdas ... keys ...)) (let (... ...) (while lambdas ... ...) (if ... ...) rval)) eieio-generic-call(f ([object D "D"])) f([object D "D"]) eval((f (make-instance (quote D)))) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp) Thanks, --drkm |