[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with make-specializable

In the previous version of PCL (2/24/87, VAXLISP) the following worked:

(use-package 'pcl)

(defun bob (x) x)

(pcl::make-specializable 'bob)

(defmethod bob ((x fixnum)) (+ x 10))

(bob 3)
(bob 'hi)

In the current version (3/19/87 prime, VAXLISP), (bob 3) works, but
(bob 'hi) gives the 'no matching method' error.  Is there
a new way to do specialization of an existing function?  How do
I keep the default function?

I noticed that the following section of code in 'make-specializable'
is commented out (methods.lsp):

;      (when (fboundp function-name)  ;*** Put this back
;	(add-named-method ;(class-prototype (class-named 'discriminator))
;			  ;(class-prototype (class-named 'method))
;			  function-name
;			  arglist
;			  ()
;			  (symbol-function function-name)))

			Rick Spickelmier
			UC Berkeley