Skip to content

Commit 8971841

Browse files
committed
fix: ensure comments in generic arrow functions don't disappear (upgrades swc)
Closes #303
1 parent 13dd884 commit 8971841

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/specs/issues/issue0303.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
== should format with comments ==
2+
const t = <X>() => (
3+
<>
4+
{/* Comment 1 */}
5+
{/* Comment 2 */}
6+
{/* Comment 3 */}
7+
</>
8+
);
9+
const u = <X>() => {
10+
// Hello world
11+
};
12+
13+
[expect]
14+
const t = <X>() => (
15+
<>
16+
{/* Comment 1 */}
17+
{/* Comment 2 */}
18+
{/* Comment 3 */}
19+
</>
20+
);
21+
const u = <X>() => {
22+
// Hello world
23+
};

0 commit comments

Comments
 (0)