mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
format properly multiline type annotations
This commit is contained in:
parent
4ed8d3eb79
commit
7361f62902
3 changed files with 50 additions and 10 deletions
|
@ -36,7 +36,11 @@ impl<'a> Formattable<'a> for Def<'a> {
|
|||
match self {
|
||||
Annotation(loc_pattern, loc_annotation) => {
|
||||
loc_pattern.format(buf, indent);
|
||||
buf.push_str(" : ");
|
||||
if loc_annotation.is_multiline() {
|
||||
buf.push_str(" :");
|
||||
} else {
|
||||
buf.push_str(" : ");
|
||||
}
|
||||
loc_annotation.format(buf, indent);
|
||||
}
|
||||
Alias { name, vars, ann } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue