==== tests/cases/compiler/genericCloneReturnTypes.ts (1 errors) ==== class Bar { public size: number; public t: T; constructor(x: number) { this.size = x; } public clone() { return new Bar(this.size); } } var b: Bar; var b2 = b.clone(); var b3: Bar; b = b2; b = b3; ~ !!! Type 'Bar' is not assignable to type 'Bar': !!! Type 'string' is not assignable to type 'number'.