Huáng Jùnliàng 563874c06c Do not remove let bindings even they are wrapped in closure (#10343)
* fix: should not remove let binding even it is wrapped in closure

Fixes #10339

* fix: remove bindings defined in blockScope when wrapped in closure

* Move test assertions to the top level to ensure that they run
2019-10-08 19:43:12 +02:00

21 lines
557 B
JavaScript

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
var _loop = function (foo, bar) {
() => foo;
var [qux] = bar;
try {} catch (e) {
var quux = qux;
}
};
for (var _ref of {}) {
var {
foo
} = _ref,
bar = _objectWithoutPropertiesLoose(_ref, ["foo"]);
_loop(foo, bar);
}