Skip to content

Commit

Permalink
backport the fix #6052 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Aug 15, 2017
1 parent c28465e commit 98824e7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Expand Up @@ -109,6 +109,7 @@ export default function () {
}
else if (left.isArrayPattern()) {
for (const element of left.node.elements) {
if (!element) continue;
const name = element.name;

const exports = this.exports[name];
Expand Down
Expand Up @@ -12,3 +12,7 @@ export function f2 () {
export function f3 () {
[x, y, z] = [3, 4, 5]
}

export function f4 () {
[x, , y] = [3, 4, 5]
}
Expand Up @@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
exports.f1 = f1;
exports.f2 = f2;
exports.f3 = f3;
exports.f4 = f4;
let x = exports.x = 0;
let y = exports.y = 0;

Expand All @@ -25,3 +26,9 @@ function f3() {
exports.y = y;
exports.x = x;
}

function f4() {
[x,, y] = [3, 4, 5];
exports.y = y;
exports.x = x;
}

0 comments on commit 98824e7

Please sign in to comment.