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

Offer better error message when failing to substitute Nothing #74

Open
propensive opened this issue Jul 24, 2023 · 0 comments
Open

Offer better error message when failing to substitute Nothing #74

propensive opened this issue Jul 24, 2023 · 0 comments
Assignees
Labels
code quality Concerns the standard of code rather than functionality minor Has only a small impact for the majority of users

Comments

@propensive
Copy link
Owner

When the type of an expression that's substituted into an interpolated string is Nothing, it probably means that the value is erroneous, and a message has already been emitted. If we can detect that the value is Nothing as the result of an error, then we don't need to emit another message, since doing so distracts from the "real" error. But if the user really does try to substitute Nothing into an interpolated string, we should emit an error.

If it's impossible to distinguish between Nothing and and error, then we should update the error message to indicate that it's probably because of another error.

@propensive propensive self-assigned this Jul 24, 2023
@propensive propensive added the code quality Concerns the standard of code rather than functionality label Jul 24, 2023
@propensive propensive added the minor Has only a small impact for the majority of users label Jul 24, 2023
@propensive propensive added this to the Platane milestone Jul 24, 2023
@propensive propensive removed this from the Platane milestone Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Concerns the standard of code rather than functionality minor Has only a small impact for the majority of users
Projects
Status: Todo
Development

No branches or pull requests

1 participant