TypeScript/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt
2014-09-11 16:11:08 -07:00

27 lines
762 B
Plaintext

==== tests/cases/compiler/inheritedModuleMembersForClodule.ts (1 errors) ====
class C {
static foo(): string {
return "123";
}
}
class D extends C {
~
!!! error TS2418: Class static side 'typeof D' incorrectly extends base class static side 'typeof C':
!!! error TS2418: Types of property 'foo' are incompatible:
!!! error TS2418: Type '() => number' is not assignable to type '() => string':
!!! error TS2418: Type 'number' is not assignable to type 'string'.
}
module D {
export function foo(): number {
return 0;
};
}
class E extends D {
static bar() {
return this.foo();
}
}