mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
fix empty record with only comments in it
This commit is contained in:
parent
b1bf03e7a0
commit
2f3d74e8bd
3 changed files with 31 additions and 1 deletions
|
@ -809,7 +809,7 @@ pub fn fmt_record<'a>(
|
|||
final_comments: &'a [CommentOrNewline<'a>],
|
||||
indent: u16,
|
||||
) {
|
||||
if loc_fields.is_empty() {
|
||||
if loc_fields.is_empty() && final_comments.iter().all(|c| c.is_newline()) {
|
||||
buf.push_str("{}");
|
||||
} else {
|
||||
buf.push('{');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue