Opened 14 years ago

Closed 13 years ago

#287 closed defect (fixed)

Can't trace single-method generic functions

Reported by: gz Owned by: gz
Priority: major Milestone:
Component: ANSI CL Compliance Version:
Keywords: Cc:


? (defmethod frotz (x) (print x))
? (trace frotz)
? (frotz 17)
0> Calling (FROTZ 17) 
> Error: Too many arguments in call to #<METHOD-FUNCTION FROTZ (T)>:
>        2 arguments provided, at most 1 accepted. 
> While executing: #<STANDARD-METHOD FROTZ (T)>, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > 

Change History (4)

comment:1 Changed 14 years ago by gz

  • Status changed from new to assigned

comment:2 Changed 14 years ago by gb

This presumably has to do with the fact that the gf-dcode in this case isn't known (and therefore the trampoline code used to call it isn't known.)

If all known dcode functions have a known trampoline, then I think it's true that any unknown dcode function would use #'FUNCALLABLE-TRAMPOLINE. (If that's not true, we can probably ensure that it is true.)

comment:3 Changed 14 years ago by hans

I'm not sure if this is the same problem, as the error message is different:

foo.lisp contains

(defmethod foo (fmt &rest args)
  (format t "foo called~%")
  (apply #'format t fmt args))
Welcome to Clozure Common Lisp Version 1.2-r9260M-trunk  (DarwinPPC32)!
? (load (compile-file "foo.lisp"))
? (foo "Hello ~A~%" 'world)
foo called
? (trace foo)
? (foo "Hello ~A~%" 'world)
0> Calling (FOO "Hello ~A~%" WORLD) 
foo called
> Error: value #<SIMPLE-VECTOR 10> is not of the expected type STRING.

comment:4 Changed 13 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed

This should be fixed in the trunk now. See r9386 and r9844.

Note: See TracTickets for help on using tickets.