TypeScript/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.errors.txt
Daniel Rosenwasser 6e77e2e810 Removed colons from diagnostic messages.
Also got rid of the 'terminalMessages' concept.
2014-10-28 00:48:58 -07:00

20 lines
No EOL
906 B
Text

tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts(7,9): error TS2323: Type '() => void' is not assignable to type '(x: number) => number'.
Type 'void' is not assignable to type 'number'.
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticMemberAssignsToConstructorFunctionMembers.ts (1 errors) ====
class C {
static foo() {
C.foo = () => { }
}
static bar(x: number): number {
C.bar = () => { } // error
~~~~~
!!! error TS2323: Type '() => void' is not assignable to type '(x: number) => number'.
!!! error TS2323: Type 'void' is not assignable to type 'number'.
C.bar = (x) => x; // ok
C.bar = (x: number) => 1; // ok
return 1;
}
}