-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
internal-issue-createdAn internal Google issue has been created to track this GitHub issueAn internal Google issue has been created to track this GitHub issuetriage-doneHas been reviewed by someone on triage rotation.Has been reviewed by someone on triage rotation.
Description
The StaticSuperPropReplacer pass does not properly account for static inheritance. The following case demonstrates code that is broken by the pass.
class Base {
static foo() {
console.log('base foo');
}
static bar() {
this.foo();
}
}
class Intermediate extends Base {
static baz() {
super.bar(); // changing `super` to `Base` changes `this` in the super call.
}
}
class Child extends Intermediate {
static foo() {
console.log('child foo');
}
}
Child.baz(); // should log "child foo"
This pattern occurs in Polymer: https://github.com/Polymer/polymer/blob/d577c8c8755b3078da605889488e8988eb31c48d/lib/mixins/template-stamp.js#L348
rictic
Metadata
Metadata
Assignees
Labels
internal-issue-createdAn internal Google issue has been created to track this GitHub issueAn internal Google issue has been created to track this GitHub issuetriage-doneHas been reviewed by someone on triage rotation.Has been reviewed by someone on triage rotation.