Only rename outer function bindings on conflict - fixes T6781
This commit is contained in:
parent
9c88b8797e
commit
afcfba2075
@ -16,4 +16,8 @@ function f() {
|
|||||||
b;
|
b;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function commit(b) {
|
||||||
|
b();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -16,4 +16,8 @@ function _f() {
|
|||||||
_b;
|
_b;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function commit(b) {
|
||||||
|
b();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -15,7 +15,7 @@ let renameVisitor = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"AssignmentExpression|Declaration"(path, state) {
|
"AssignmentExpression|Declaration"(path, state) {
|
||||||
let ids = path.getBindingIdentifiers();
|
let ids = path.getOuterBindingIdentifiers();
|
||||||
|
|
||||||
for (let name in ids) {
|
for (let name in ids) {
|
||||||
if (name === state.oldName) ids[name].name = state.newName;
|
if (name === state.oldName) ids[name].name = state.newName;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user