-
Notifications
You must be signed in to change notification settings - Fork 12.8k
"supper" keyword with Arrow function methods #11575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
This is actually per ES spec. From MakeSuperPropertyReference:
https://tc39.github.io/ecma262/#sec-makesuperpropertyreference From HasSuperBinding:
https://tc39.github.io/ecma262/2016/#sec-function-environment-records-hassuperbinding From NewFunctionEnvironment:
https://tc39.github.io/ecma262/2016/#sec-newfunctionenvironment From FunctionInitialize:
https://tc39.github.io/ecma262/2016#sec-function-environment-records-hassuperbinding |
I have a similar case but with getter/setter. This works fine when transpiling to ES2015 but not when transpiling to ES5. Example from the playground: class Foo {
private _foobar: string;
public get foobar(): string {
return this._foobar;
}
public set foobar(value: string) {
this._foobar = value;
}
}
class Bar extends Foo {
constructor() {
super();
}
public set foobar(value: string) {
super.foobar = `child-${value}`;
}
} or when using as a getter class Bar extends Foo {
constructor() {
super();
console.log(super.foobar);
}
} |
Code
Actual behavior:
ERROR
TypeScript: 2.0.3
OS: Windows 10 x64
Node: 6.3.0
The text was updated successfully, but these errors were encountered: