TypeScript/tests/baselines/reference/superCallInStaticMethod.errors.txt
2014-07-12 17:30:19 -07:00

51 lines
1.4 KiB
Plaintext

==== tests/cases/compiler/superCallInStaticMethod.ts (2 errors) ====
class Doing {
public static staticMethod() {
}
}
class Other extends Doing {
// in static method
public static staticMethod() {
super.staticMethod();
}
// in a lambda inside a static method
public static lambdaInsideAStaticMethod() {
() => {
super.staticMethod();
}
}
// in an object literal inside a static method
public static objectLiteralInsideAStaticMethod() {
return {
a: () => {
super.staticMethod();
},
b: super.staticMethod()
};
}
// in a getter
public static get staticGetter() {
~~~~~~~~~~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
super.staticMethod();
return 0;
}
// in a setter
public static set staticGetter(value: number) {
~~~~~~~~~~~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
super.staticMethod();
}
// in static method
public static initializerInAStaticMethod(a = super.staticMethod()) {
super.staticMethod();
}
}