Skip to content

Commit

Permalink
Add rename test for bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yulanggong committed May 25, 2020
1 parent 97f0b7c commit daa89c0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
@@ -0,0 +1,7 @@
function test(b) {
var a = b + 1,
a = a + 1,
a = a + 1;

return a;
}
@@ -0,0 +1,3 @@
{
"plugins": ["./plugin"]
}
@@ -0,0 +1,7 @@
function test(b) {
var _a = b + 1,
_a = _a + 1,
_a = _a + 1;

return _a;
}
@@ -0,0 +1,9 @@
module.exports = function() {
return {
visitor: {
Scope(path) {
path.scope.rename("a", "_a");
}
}
};
}

0 comments on commit daa89c0

Please sign in to comment.