-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Bug Report
- I would like to work on a fix!
Current behavior
A clear and concise description of the behavior.
- REPL, Codesandbox, or GitHub Repo helps!
Input Code
async function v(source, map,unmap=v=>v) {
for await (source of source) {
}
}Running with preset-env with esmodules.
Expected behavior
There shouldn't be an internal error during traversal of the constant violation. I'm not convinced there is even a constant violation here. Interestingly both the arrow function and repeated binding in the for loop are required to reproduce the error despite having different names.
- Babel version(s): 7.9.6
Possible Solution
It seems like this is a scoping bug and that neither should be constantViolations during the scoping phase, so that would be the root cause here to me. But that such a constantViolation can cause an internal error may be a bug in the traversal or the population of the constantViolation code path as well I suppose.
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue