You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2170340
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: test/unitCases/syntax-printer.unittest.js
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3070,6 +3070,11 @@ const CORRECTED_CASES = [
3070
3070
'function f() { switch (1) { case 0: let s = 1; console.log(s); break; case 1: console.log(typeof s); default: console.log("d"); } } try { f(); } catch (e) { console.log(e.name); }',
3071
3071
{ compress: {}, mangle: false }
3072
3072
],
3073
+
[
3074
+
"a `let` of a case a constant `switch` drops, which an earlier case's label reads in its dead zone",
3075
+
'var x = 1; function f() { switch (1) { case x: console.log("x"); case 1: console.log("one"); break; case 2: let x = 2; console.log(x); } } try { f(); } catch (e) { console.log(e.name); }',
3076
+
{ compress: {}, mangle: false }
3077
+
],
3073
3078
[
3074
3079
"a class of a case a constant `switch` skips, which a reached case reads in its dead zone",
3075
3080
'try { switch (1) { case 0: class C {} console.log("no"); case 1: console.log(typeof C); } } catch (e) { console.log(e.name); }',
0 commit comments