mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
handle record access when checking for block string literals
This commit is contained in:
parent
6d2b635dbc
commit
875e355b68
5 changed files with 72 additions and 1 deletions
|
@ -1014,7 +1014,6 @@ pub fn fmt_body<'a>(
|
|||
allow_simplify_empty_record_destructure: bool,
|
||||
pattern: &'a Pattern<'a>,
|
||||
body: &'a Expr<'a>,
|
||||
|
||||
indent: u16,
|
||||
) {
|
||||
let pattern_extracted = pattern.extract_spaces();
|
||||
|
@ -1168,6 +1167,7 @@ pub fn starts_with_block_string_literal(expr: &Expr<'_>) -> bool {
|
|||
starts_with_block_string_literal(inner)
|
||||
}
|
||||
Expr::Apply(inner, _, _) => starts_with_block_string_literal(&inner.value),
|
||||
Expr::RecordAccess(inner, _) => starts_with_block_string_literal(inner),
|
||||
Expr::PncApply(inner, _) => starts_with_block_string_literal(&inner.value),
|
||||
Expr::TrySuffix(inner) => starts_with_block_string_literal(inner),
|
||||
_ => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue