diff --git a/compiler/reporting/src/type_error.rs b/compiler/reporting/src/type_error.rs index bd843e558b..0d21ae8fee 100644 --- a/compiler/reporting/src/type_error.rs +++ b/compiler/reporting/src/type_error.rs @@ -124,9 +124,9 @@ fn to_expr_report( let problem = Concat(vec![ plain_text("This "), code_text("if"), - plain_text(" condition should be a "), + plain_text(" condition needs to be a "), ReportText::Type(Content::Alias(Symbol::BOOL_BOOL, vec![], Variable::BOOL)), - plain_text(", but it isn’t."), + plain_text("."), ]); report_bad_type( @@ -137,10 +137,11 @@ fn to_expr_report( region, Some(expr_region), problem, - "Instead it’s", + "Right now it’s", Concat(vec![ + plain_text("I need every "), code_text("if"), - plain_text(" conditions must evaluate to a "), + plain_text(" condition to evaluate to a "), ReportText::Type(Content::Alias( Symbol::BOOL_BOOL, vec![], diff --git a/compiler/reporting/tests/test_reporting.rs b/compiler/reporting/tests/test_reporting.rs index 54a2a8b5a9..5bf5235946 100644 --- a/compiler/reporting/tests/test_reporting.rs +++ b/compiler/reporting/tests/test_reporting.rs @@ -766,16 +766,16 @@ mod test_reporting { ), indoc!( r#" - This `if` condition should be a Bool, but it isn’t. + This `if` condition needs to be a Bool. 1 ┆ if "foo" then 2 else 3 ┆ ^^^^^ - Instead it’s a string of type: + Right now it’s a string of type: Str - `if` conditions must evaluate to a Bool—either `True` or `False`. + I need every `if` condition to evaluate to a Bool—either `True` or `False`. "# ),