Merge pull request #4511 from motiz88/fix-4462

Fix UpdateExpression handling in es2015-modules-commonjs, resolve #4462
This commit is contained in:
Logan Smyth 2016-09-25 14:16:53 -07:00 committed by GitHub
commit 819cde936c
4 changed files with 19 additions and 2 deletions

View File

@ -119,8 +119,7 @@ export default function () {
}
nodes.push(t.binaryExpression(operator, arg.node, t.numericLiteral(1)));
let newPaths = path.replaceWithMultiple(t.sequenceExpression(nodes));
for (const newPath of newPaths) this.requeueInParent(newPath);
path.replaceWithMultiple(t.sequenceExpression(nodes));
}
};

View File

@ -0,0 +1,4 @@
export { yy, zz };
var yy = 0;
var zz = yy++;

View File

@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.yy = yy;
exports.zz = zz;
var yy = 0;
var zz = (exports.yy = yy += 1, yy - 1);

View File

@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}