mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-07 01:40:41 -08:00
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:
parent
b3400e9e93
commit
5a13085f22
2 changed files with 9 additions and 5 deletions
|
|
@ -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 ***
|
||||
|
|
|
|||
|
|
@ -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))))
|
||||
)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue