add default initializer to let variables within loop bodies and fix excessive break replacement inside of switches in let scoping - fixes #255
This commit is contained in:
11
test/fixtures/transformation/es6-let-scoping/loop-initializer-default/actual.js
vendored
Normal file
11
test/fixtures/transformation/es6-let-scoping/loop-initializer-default/actual.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
while (value) {
|
||||
let foo;
|
||||
|
||||
if (bar) {
|
||||
foo = [];
|
||||
}
|
||||
|
||||
if (foo) {
|
||||
doIt();
|
||||
}
|
||||
}
|
||||
13
test/fixtures/transformation/es6-let-scoping/loop-initializer-default/expected.js
vendored
Normal file
13
test/fixtures/transformation/es6-let-scoping/loop-initializer-default/expected.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
while (value) {
|
||||
var foo = undefined;
|
||||
|
||||
if (bar) {
|
||||
foo = [];
|
||||
}
|
||||
|
||||
if (foo) {
|
||||
doIt();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user