inherit destructuring param replacement ref from original param - fixes #1461

This commit is contained in:
Sebastian McKenzie 2015-05-06 16:29:54 +01:00
parent 31a4195c81
commit fc8540d88a

View File

@ -63,6 +63,7 @@ exports.Function = function (node, parent, scope, file) {
hasDestructuring = true; hasDestructuring = true;
var ref = scope.generateUidIdentifier("ref"); var ref = scope.generateUidIdentifier("ref");
t.inherits(ref, pattern);
var destructuring = new DestructuringTransformer({ var destructuring = new DestructuringTransformer({
blockHoist: node.params.length - i, blockHoist: node.params.length - i,