check parent for variable collisions when remapping closurified block scopes - fixes #915, closes #922
This commit is contained in:
5
test/fixtures/transformation/es6-block-scoping/wrap-closure-shadow-variables/actual.js
vendored
Normal file
5
test/fixtures/transformation/es6-block-scoping/wrap-closure-shadow-variables/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
let a = 1;
|
||||
for (let a = 1; a < 100; a++) {
|
||||
items.forEach(item => a);
|
||||
}
|
||||
console.log(a);
|
||||
11
test/fixtures/transformation/es6-block-scoping/wrap-closure-shadow-variables/expected.js
vendored
Normal file
11
test/fixtures/transformation/es6-block-scoping/wrap-closure-shadow-variables/expected.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
var a = 1;
|
||||
for (var _a = 1; _a < 100; _a++) {
|
||||
(function (_a) {
|
||||
items.forEach(function (item) {
|
||||
return _a;
|
||||
});
|
||||
})(_a);
|
||||
}
|
||||
console.log(a);
|
||||
Reference in New Issue
Block a user