Revise conditional error wording.

This commit is contained in:
Richard Feldman 2020-04-03 01:05:55 -04:00
parent 67b7be9786
commit dc3e2d307c
2 changed files with 8 additions and 7 deletions

View file

@ -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 isnt."),
plain_text("."),
]);
report_bad_type(
@ -137,10 +137,11 @@ fn to_expr_report(
region,
Some(expr_region),
problem,
"Instead its",
"Right now its",
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![],