==== tests/cases/compiler/genericSpecializations3.ts (3 errors) ==== interface IFoo { foo(x: T): T; } var iFoo: IFoo; iFoo.foo(1); class IntFooBad implements IFoo { // error ~~~~~~~~~ !!! Class 'IntFooBad' incorrectly implements interface 'IFoo': !!! Types of property 'foo' are incompatible: !!! Type '(x: string) => string' is not assignable to type '(x: number) => number': !!! Types of parameters 'x' and 'x' are incompatible: !!! Type 'string' is not assignable to type 'number'. foo(x: string): string { return null; } } var intFooBad: IntFooBad; class IntFoo implements IFoo { foo(x: number): number { return null; } } var intFoo: IntFoo; class StringFoo2 implements IFoo { foo(x: string): string { return null; } } var stringFoo2: StringFoo2; stringFoo2.foo("hm"); intFoo = stringFoo2; // error ~~~~~~ !!! Type 'StringFoo2' is not assignable to type 'IntFoo': !!! Types of property 'foo' are incompatible: !!! Type '(x: string) => string' is not assignable to type '(x: number) => number': !!! Types of parameters 'x' and 'x' are incompatible: !!! Type 'string' is not assignable to type 'number'. stringFoo2 = intFoo; // error ~~~~~~~~~~ !!! Type 'IntFoo' is not assignable to type 'StringFoo2': !!! Types of property 'foo' are incompatible: !!! Type '(x: number) => number' is not assignable to type '(x: string) => string': !!! Types of parameters 'x' and 'x' are incompatible: !!! Type 'number' is not assignable to type 'string'. class StringFoo3 implements IFoo { // error foo(x: T): T { return null; } } var stringFoo3: StringFoo3;