Loops create redundant "arguments" variables
- Dominant language
- JavaScript
- Stars
- 874
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Like #120, but for "arguments" instead of "this". Let me use the same example:
[Minimal example](https://buble.surge.sh/#function%20bar()%20%7B%0A%20%20while%20(true)%20arguments%3B%0A%7D):
```js
function bar() {
while (true) arguments;
}
```
Produces:
```js
function bar() {
var arguments$1 = arguments;
while (true) { arguments$1; }
}
```
Expected output:
```js
function bar() {
while (true) { arguments; }
}
```
#120 was fixed in #121, but I don't feel confident enough to propose a PR myself.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the minimal example from the issue and compare the behavior with the fix described in #120 and #121. The work is done when transforming the example no longer creates a redundant arguments$1 variable and produces the expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100