tests/cases/compiler/generics4.ts(7,1): error TS2322: Type 'C' is not assignable to type 'C'. Type 'Y' is not assignable to type 'X'. Types of property 'f' are incompatible. Type '() => boolean' is not assignable to type '() => string'. Type 'boolean' is not assignable to type 'string'. ==== tests/cases/compiler/generics4.ts (1 errors) ==== class C { private x: T; } interface X { f(): string; } interface Y { f(): boolean; } var a: C; var b: C; a = b; // Not ok - return types of "f" are different ~ !!! error TS2322: Type 'C' is not assignable to type 'C'. !!! error TS2322: Type 'Y' is not assignable to type 'X'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '() => boolean' is not assignable to type '() => string'. !!! error TS2322: Type 'boolean' is not assignable to type 'string'.