Skip to content

Commit 8d632e8

Browse files
xi xiaoxixiaofinland
authored andcommitted
fix: bugfixing class_literal missing dot in print
1 parent 7dd6466 commit 8d632e8

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

src/enum_def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ impl<'a> DocBuild<'a> for ClassLiteral {
427427
fn build_inner(&self, b: &'a DocBuilder<'a>, result: &mut Vec<DocRef<'a>>) {
428428
build_with_comments_and_punc(b, &self.node_context, result, |b, result| {
429429
result.push(self.type_.build(b));
430-
result.push(b.txt("class"));
430+
result.push(b.txt(".class"));
431431
});
432432
}
433433
}

tests/prettier80/class_literal.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
class A {
22
{
33
Account.class;
4+
JSON.deserialize(fileIdString, List<String>.class);
45
}
56
}

tests/prettier80/class_literal.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class A {
2+
{
3+
Account.class;
4+
JSON.deserialize(fileIdString, List<String>.class);
5+
}
6+
}

tests/prettier80/co

Whitespace-only changes.

0 commit comments

Comments
 (0)