Offer better error message when failing to substitute Nothing
#74
Labels
code quality
Concerns the standard of code rather than functionality
minor
Has only a small impact for the majority of users
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 isNothing
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 substituteNothing
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.The text was updated successfully, but these errors were encountered: