Fix formatting of applies in backpassing

This commit is contained in:
Joshua Warner 2021-11-26 19:50:15 -08:00
parent 0a58d6e60e
commit 02b51bcd37
2 changed files with 63 additions and 1 deletions

View file

@ -2714,6 +2714,46 @@ mod test_fmt {
));
}
#[test]
fn backpassing_simple() {
expr_formats_same(indoc!(
r#"
getChar = \ctx ->
x <- Task.await (getCharScope scope)
42
42
"#
));
}
#[test]
fn backpassing_apply_tag() {
expr_formats_same(indoc!(
r#"
getChar = \ctx ->
(T val newScope) <- Task.await (getCharScope scope)
42
42
"#
));
}
#[test]
fn backpassing_body_on_newline() {
expr_formats_same(indoc!(
r#"
getChar = \ctx ->
x <-
Task.await (getCharScope scope)
42
42
"#
));
}
// this is a parse error atm
// #[test]
// fn multiline_apply() {