mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Fix formatting in the presence of a package name in TypeAnnotation::Apply
This commit is contained in:
parent
2939780638
commit
08e8b93bb6
1 changed files with 6 additions and 1 deletions
|
@ -277,7 +277,7 @@ impl<'a> Formattable<'a> for TypeAnnotation<'a> {
|
|||
buf.push(')')
|
||||
}
|
||||
}
|
||||
Apply(_, name, arguments) => {
|
||||
Apply(pkg, name, arguments) => {
|
||||
// NOTE apply is never multiline
|
||||
let write_parens = parens == Parens::InApply && !arguments.is_empty();
|
||||
|
||||
|
@ -285,6 +285,11 @@ impl<'a> Formattable<'a> for TypeAnnotation<'a> {
|
|||
buf.push('(')
|
||||
}
|
||||
|
||||
if !pkg.is_empty() {
|
||||
buf.push_str(pkg);
|
||||
buf.push('.');
|
||||
}
|
||||
|
||||
buf.push_str(name);
|
||||
|
||||
for argument in *arguments {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue