parent
3d95e8317b
commit
7be4994d1a
|
@ -971,10 +971,10 @@ function genericPrintNoParens(path, options, print) {
|
|||
"switch (",
|
||||
path.call(print, "discriminant"),
|
||||
") {",
|
||||
indent(
|
||||
n.cases.length > 0 ? indent(
|
||||
options.tabWidth,
|
||||
concat([ hardline, join(hardline, path.map(print, "cases")) ])
|
||||
),
|
||||
) : "",
|
||||
hardline,
|
||||
"}"
|
||||
]);
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
exports[`test empty_switch.js 1`] = `
|
||||
"switch (1) { default:; }
|
||||
switch (1) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
switch (1) {
|
||||
default:
|
||||
}
|
||||
switch (1) {
|
||||
}
|
||||
"
|
||||
`;
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
switch (1) { default:; }
|
||||
switch (1) {}
|
||||
|
|
Loading…
Reference in New Issue