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

Improve error message on types used as vars #4180

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

5c077m4n
Copy link
Contributor

@5c077m4n 5c077m4n commented Jan 17, 2025

Closes #4112

This is the simplest fix to improve the error message when using a type instead of a value (when it's not in scope).
Another approach could be to create a new error type, but that will lead to more code duplication and "tribal" knowledge (you have to check the variable's name before every creation of the error), WDYT?

@5c077m4n 5c077m4n force-pushed the improve-warning-on-types-used-as-vars branch 4 times, most recently from 03c2610 to b46847e Compare January 17, 2025 22:34
@5c077m4n 5c077m4n force-pushed the improve-warning-on-types-used-as-vars branch from b46847e to 612766e Compare January 18, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve custom type pattern matching error message
1 participant