Skip to content

Conversation

@zth
Copy link
Member

@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