-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
PR: Spec Compliance 👓A type of pull request used for our changelog categoriesA type of pull request used for our changelog categoriesoutdatedA 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
Input Code
class Test {
constructor() {
class Other extends Test {
a = () => super.test;
}
}
}Babel Configuration (.babelrc, package.json, cli command)
{
"presets": ["es2015", "stage-2"]
}Expected Behavior
Other's super calls should reference Other's prototype chain.
Current Behavior
Other's super calls reference Test (the outer class)
Possible Solution
We're traversing too far into classes (specifically into their properties). Class properties define their own context (they have a implicit initializer function). We could either stop at Class (not super future proof, if a new node is later added to acceptable ClassBody list), or we can stop at both Functions (like we do today) and ClassProperty.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PR: Spec Compliance 👓A type of pull request used for our changelog categoriesA type of pull request used for our changelog categoriesoutdatedA 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