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.
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.