anchor.diff:                                                       :qualifiers (make-qualifiers-list (list ,@qualifiers))))))
                                            parameters))
                            :return-type ',(cadr (assoc :return-type options))
  +						 :qualifiers '(,@(cdr (assoc :qualifiers options)))
                            :cim-name ,(cadr (assoc :cim-name options)))))
        ;; define a Lisp function
  -     (defun ,name (,instance-var ,@(mapcar #'car parameters)) ,@body)
  +     (defun ,name (,instance-var ,@(mapcar #'car parameters))
  +	   (declare (,class-name ,instance-var)
  +				,@(mapcar (lambda (parameter)
  +							`(,(cadr parameter) ,(car parameter)))
  +						  parameters))
  +	   ,@body)
  +	 
        ;; set the funcallable instance function
        (closer-mop:set-funcallable-instance-function method (symbol-function ',name))
        
        ;; attach to the class
        (let ((class (find-class ',class-name)))
  -       (push method (cim-class-methods class)))
  +       (pushnew* method (cim-class-methods class)
  +				 :test (lambda (meth new-meth)
  +						 (string-equal (cim-name meth)
  +									   (cim-name new-meth)))))
        ',name))
   
   ;; ------------ errors -----------
  
positive.code: (defmethod provider-get-instance ((instance myclass))
    (cim-error :not-found))
  
  (defclass myclass2 (myclass)
    ((age :initarg :age :Accessor myclass-age))
    (:metaclass cim-class)
  
negative.code:           (cons (car kwlist)
                  (cadr kwlist)))))))
  
  (defun adjoin* (item list &key key test test-not)
    (declare (list list)
  		   ((or function null) key test test-not))
    (do ((%list list (cdr %list))
  	   (ret nil))
  	  ((null %list) (cons item ret))
  	(let ((top (if key (funcall key (car %list)) (car %list))))
  	  (if (or (and test (funcall test item top))
  			  (and test-not (not (funcall test-not item top)))
  			  (eql item top))
  		(return-from adjoin* (append ret (list item) (cdr %list)))
  		(push (car %list) ret)))))
  
  (defmacro pushnew* (item list &key key test test-not)
    (let ((gitem (gensym "ITEM"))
  		(glist (gensym "LIST")))
  	`(let* ((,gitem ,item)
  			(,glist (adjoin* ,gitem ,list :key ,key :test ,test :test-not ,test-not)))
  	   (setf ,list ,glist))))
  
  ;; ----- namespaces ------
  
  