mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Avoid patterns that may look like implements clauses without parens
This commit is contained in:
parent
8f2a10d52d
commit
24dd11262e
2 changed files with 8 additions and 1 deletions
|
@ -568,7 +568,13 @@ impl<'a> Formattable for TypeHeader<'a> {
|
|||
last_after = var.after;
|
||||
last_multiline = var.item.is_multiline();
|
||||
|
||||
let need_parens = matches!(var.item, Pattern::Apply(..));
|
||||
let need_parens = matches!(
|
||||
var.item,
|
||||
Pattern::Apply(..)
|
||||
| Pattern::Identifier {
|
||||
ident: "implements"
|
||||
}
|
||||
);
|
||||
|
||||
if need_parens {
|
||||
buf.indent(vars_indent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue