-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
facebook/regenerator
#368Labels
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
Current Behavior
babel throws
Duplicate declaration "foo" (This is an error on an internal node. Probably an internal error.)
Input Code
- REPL or Repo link if applicable:
Note: you have to manually add @babel/transform-regenerator 7.0.0 plugin since the url does not synchronize plugin selections.
(async () => {
(async () => {
const foo = 42;
})()
})()
Expected behavior/code
Compiled as regenerator calls
Babel Configuration (.babelrc, package.json, cli command)
module.exports = {
plugins: [
"@babel/transform-regenerator"
]
}Environment
- Babel version(s): v7.0.0
- Node/npm version: Node 10
- OS: macOS 10.14
- Monorepo no
- How you are using Babel: cli
Possible Solution
Workaround: add await to the nested async function.
Additional context/Screenshots
Possibly related: #8525
Reactions are currently unavailable
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