improve error message for <| operator non-existence

This commit is contained in:
Artsiom Shamsutdzinau 2023-07-07 17:44:39 +02:00
parent 98d0742c62
commit a806ea1a5b
No known key found for this signature in database
GPG key ID: 2C0D1AA35BD2FF16

View file

@ -300,6 +300,13 @@ fn to_expr_report<'a>(
alloc.parser_suggestion("!"), alloc.parser_suggestion("!"),
alloc.reflow(" and the expression after it."), alloc.reflow(" and the expression after it."),
], ],
"<|" => vec![
alloc.reflow("Roc doesn't have "),
alloc.parser_suggestion("<|"),
alloc.reflow(" operator. Please use parentheses or "),
alloc.parser_suggestion("|>"),
alloc.reflow(" operator instead."),
],
_ => vec![ _ => vec![
alloc.reflow("I have no specific suggestion for this operator, "), alloc.reflow("I have no specific suggestion for this operator, "),
alloc.reflow("see TODO for the full list of operators in Roc."), alloc.reflow("see TODO for the full list of operators in Roc."),