File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
test/com/google/javascript/jscomp Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,16 @@ public void testSwitchExitPoints1() {
322322 "switch (x) { case 1: if (x) { f(); } break; default: g(); }" );
323323 }
324324
325+ @ Test
326+ public void testFoldBlockScopedVariables_bug () {
327+ disableNormalize ();
328+ fold (
329+ "function f() { if (x) {return;} else { let c = 1; } var c; return !!c; }" ,
330+ // TODO: b/470408326 - fix this output.
331+ // "Uncaught SyntaxError: Identifier 'c' has already been declared"
332+ "function f() { if (x){} else { let c = 1; var c; return !!c; } }" );
333+ }
334+
325335 @ Test
326336 public void testFoldBlockScopedVariables () {
327337 // When moving block-scoped variable declarations into inner blocks, first convert them to
You can’t perform that action at this time.
0 commit comments