Adding a new specialization to a generic function does not result in a warning when the function is in a locked package

This commit is contained in:
jjgarcia 2005-12-20 10:31:07 +00:00
parent b3400e9e93
commit 5a13085f22
2 changed files with 9 additions and 5 deletions

View file

@ -26,6 +26,9 @@ ECL 0.9i
> (SETQ X 1)
1
- Adding a new method to a generic function does no longer result in a warning
when the function belongs to a locked package.
;;; Local Variables: ***
;;; mode:text ***
;;; fill-column:79 ***

View file

@ -230,15 +230,16 @@
(setf gfun (fdefinition traced)))
(cond ((not (legal-generic-function-name-p name))
(simple-program-error "~A is not a valid generic function name" name))
((not (fboundp name)))
((not (fboundp name))
(setf (fdefinition (or traced name))
(apply #'ensure-generic-function-using-class gfun name args)))
;; a generic function already exists
((si::instancep (or gfun (setf gfun (fdefinition name)))))
((si::instancep (or gfun (setf gfun (fdefinition name))))
gfun)
((special-operator-p name)
(simple-program-error "The special operator ~A is not a valid name for a generic function" name))
((macro-function name)
(simple-program-error "The symbol ~A is bound to a macro and is not a valid name for a generic function" name))
(t
(simple-program-error "The symbol ~A is bound to an ordinary function and is not a valid name for a generic function" name))
)
(setf (fdefinition (or traced name))
(apply #'ensure-generic-function-using-class gfun name args))))
)))