mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 08:17:40 +03:00
parent
b7e9b07acb
commit
bbb2083dd6
@ -1382,9 +1382,9 @@ fn sub_expr_requests_parens(expr: &Expr<'_>) -> bool {
|
|||||||
| BinOp::LessThanOrEq
|
| BinOp::LessThanOrEq
|
||||||
| BinOp::GreaterThanOrEq
|
| BinOp::GreaterThanOrEq
|
||||||
| BinOp::And
|
| BinOp::And
|
||||||
| BinOp::Or => true,
|
| BinOp::Or
|
||||||
BinOp::Pizza
|
| BinOp::Pizza => true,
|
||||||
| BinOp::Assignment
|
BinOp::Assignment
|
||||||
| BinOp::IsAliasType
|
| BinOp::IsAliasType
|
||||||
| BinOp::IsOpaqueType
|
| BinOp::IsOpaqueType
|
||||||
| BinOp::Backpassing => false,
|
| BinOp::Backpassing => false,
|
||||||
|
@ -5582,6 +5582,21 @@ mod test_fmt {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn format_nested_pipeline() {
|
||||||
|
expr_formats_same(indoc!(
|
||||||
|
r#"
|
||||||
|
(a |> b) |> c
|
||||||
|
"#
|
||||||
|
));
|
||||||
|
|
||||||
|
expr_formats_same(indoc!(
|
||||||
|
r#"
|
||||||
|
a |> b |> c
|
||||||
|
"#
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
// this is a parse error atm
|
// this is a parse error atm
|
||||||
// #[test]
|
// #[test]
|
||||||
// fn multiline_apply() {
|
// fn multiline_apply() {
|
||||||
|
Loading…
Reference in New Issue
Block a user