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

Add context to error message when unit is expected #7045

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

zth
Copy link
Collaborator

@zth zth commented Sep 21, 2024

Adds some simple context to error messages when unit is expected. I would like to also add a contextual message "Did you mean to return this value from the function? Make sure it's the final expression in the function body to return it" but that requires tracking if the error happens inside of a function or not, and that's a lot more work, so skipping for now.

Part of #6975

@zth zth changed the title Ad context to error message when unit is expected Add context to error message when unit is expected Sep 21, 2024
Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

@zth zth merged commit f6b0038 into master Sep 23, 2024
20 checks passed
@zth zth deleted the error-message-expected-unit-context branch September 23, 2024 09:54
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.

2 participants