mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 21:40:58 +00:00
Remove backpassing
This commit is contained in:
parent
b8040bf6a2
commit
cbcbfd3265
94 changed files with 231 additions and 2246 deletions
|
|
@ -11685,31 +11685,6 @@ All branches in an `if` must have the same type!
|
|||
"
|
||||
);
|
||||
|
||||
test_report!(
|
||||
deprecated_backpassing,
|
||||
indoc!(
|
||||
r#"
|
||||
foo = \bar ->
|
||||
baz <- Result.try bar
|
||||
|
||||
Ok (baz * 3)
|
||||
|
||||
foo (Ok 123)
|
||||
"#
|
||||
),
|
||||
@r###"
|
||||
── BACKPASSING DEPRECATED in /code/proj/Main.roc ───────────────────────────────
|
||||
|
||||
Backpassing (<-) like this will soon be deprecated:
|
||||
|
||||
5│ baz <- Result.try bar
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You should use a ! for awaiting tasks or a ? for trying results, and
|
||||
functions everywhere else.
|
||||
"###
|
||||
);
|
||||
|
||||
test_report!(
|
||||
unknown_shorthand_no_deps,
|
||||
indoc!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue