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

Unhandled error: Missing method definition(s). #1370

Open
YarinHeffes opened this issue Feb 5, 2025 · 1 comment
Open

Unhandled error: Missing method definition(s). #1370

YarinHeffes opened this issue Feb 5, 2025 · 1 comment
Labels

Comments

@YarinHeffes
Copy link
Collaborator

When defining an instance of a type-class, omitting method definitions results in an error that is not explicit about the absence of the method definition(s).

The following block,

(coalton-toplevel 
  (define-class (C :T)
    (m (:T -> Unit)))
  (define-instance (C Integer)))

results in the following error,

The value
  COMMON-LISP:NIL
is not of type
  COALTON-IMPL/PARSER/TOPLEVEL:INSTANCE-METHOD-DEFINITION

Suggested error message:

Instance definition for type-class C is missing definition(s) for method(s) M
@stylewarning
Copy link
Member

Great find. A PR should test for both missing methods and extra methods.

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

No branches or pull requests

2 participants