Skip to content

Commit b642f8c

Browse files
authored
Fix indentation of "default:" for emitted switch statements (#8352)
1 parent 1642c25 commit b642f8c

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

compiler/core/js_dump.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,6 @@ and statement_desc top cxt f (s : J.statement_desc) : cxt =
15191519
P.space f;
15201520
P.string f label);
15211521
semi f;
1522-
P.newline f;
15231522
cxt
15241523
| Return e -> (
15251524
match e.expression_desc with

tests/tests/src/loop_control_test.mjs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Mocha.describe("Loop_control_test", () => {
1515
}
1616
if (i === 5) {
1717
break;
18-
1918
}
2019
values = {
2120
hd: i,
@@ -42,7 +41,6 @@ Mocha.describe("Loop_control_test", () => {
4241
};
4342
} else {
4443
break;
45-
4644
}
4745
} else {
4846
continue;
@@ -68,7 +66,7 @@ Mocha.describe("Loop_control_test", () => {
6866
continue loop_0;
6967
case "stop" :
7068
break loop_0;
71-
default:
69+
default:
7270
values = {
7371
hd: i,
7472
tl: values
@@ -89,7 +87,6 @@ Mocha.describe("Loop_control_test", () => {
8987
}
9088
if (i === 4) {
9189
break;
92-
9390
}
9491
values = {
9592
hd: i,
@@ -106,7 +103,6 @@ Mocha.describe("Loop_control_test", () => {
106103
let reached = false;
107104
while (true) {
108105
break;
109-
110106
};
111107
Test_utils.eq("File \"loop_control_test.res\", line 95, characters 7-14", false, reached);
112108
});
@@ -138,7 +134,6 @@ Mocha.describe("Loop_control_test", () => {
138134
};
139135
} else {
140136
break;
141-
142137
}
143138
} else {
144139
continue;
@@ -161,7 +156,7 @@ Mocha.describe("Loop_control_test", () => {
161156
continue loop_1;
162157
case "stop" :
163158
break loop_1;
164-
default:
159+
default:
165160
values = {
166161
hd: i,
167162
tl: values

0 commit comments

Comments
 (0)