mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Change conversion diagnostic from saying "value" to "expression" (#5221)
Avoids TODO to make the message change based on the expression category. Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
@@ -1288,11 +1288,9 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id,
|
||||
return DiagnoseConversionFailureToConstraintValue(context, loc_id,
|
||||
expr_id, target);
|
||||
} else {
|
||||
// TODO: Should this message change to say "object of type" when
|
||||
// converting from a reference expression?
|
||||
CARBON_DIAGNOSTIC(ConversionFailure, Error,
|
||||
"cannot{0:| implicitly} convert value of type {1} to "
|
||||
"{2}{0: with `as`|}",
|
||||
"cannot{0:| implicitly} convert expression of type "
|
||||
"{1} to {2}{0: with `as`|}",
|
||||
Diagnostics::BoolAsSelect, TypeOfInstId,
|
||||
SemIR::TypeId);
|
||||
return context.emitter().Build(
|
||||
|
||||
Reference in New Issue
Block a user