Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define condition method-already-on-generic-function #85

Open
robert-strandh opened this issue Apr 29, 2017 · 0 comments
Open

Define condition method-already-on-generic-function #85

robert-strandh opened this issue Apr 29, 2017 · 0 comments

Comments

@robert-strandh
Copy link
Owner

In the file Code/CLOS/add-remove-method-support.lisp, in the
function add-method-default, a simple error is signaled when an
attempt is made to add a method to a generic function, but that method
is already associated with the generic function.

To avoid the simple error, in the file Code/CLOS/conditions.lisp,
define a new condition named METHOD-ALREADY-ON-GENERIC-FUNCTION,
modeled after the other conditions in that file. Do not use the
:REPORT option. Define two slots %METHOD and %GENERIC-FUNCTION with
readers METHOD and GENERIC-FUNCTION respectively.

In the file Code/CLOS/condition-reporters-english.lisp, define
a method for reporting the new condition, modeled after the other
methods in this file.

In the file Code/CLOS/packages.lisp, shadow the symbols METHOD and
GENERIC-FUNCTION.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant