-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Spec: ClassesoutdatedA 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 generates invalid code (yield or await inside a normal function)
Input Code
- REPL or Repo link if applicable:
function* f() {
return class A {
[yield 0]() {
return 3;
}
}
}
var buildClass = f();
buildClass.next();
var A = buildClass.next("foo").value;
alert(new A().foo());
Expected behavior/code
It should alert 3
Babel Configuration (.babelrc, package.json, cli command)
preset-env
Environment
- Babel version(s): v7.0.0-beta.52
Possible Solution
a) Compute the keys before the IIFE
b) Make the iife the correct function type
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
Metadata
Metadata
Assignees
Labels
Spec: ClassesoutdatedA 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