-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBy DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead
Description
According to the spec, 'super' is not valid inside of a object literal's accessors. This is now considered an error. To work around this, capture the class reference in a new variable outside of the object literal.
class F { public test(): string { return ""; } }
class SuperObjectTest extends F {
public testing() {
var test = {
get F() {
return super.test();
// !!! 'super' cannot be referenced here.
}
};
}
}
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBy DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead