tests/cases/compiler/genericCloneReturnTypes2.ts(15,5): error TS2322: Type 'MyList' is not assignable to type 'MyList'. Type 'string' is not assignable to type 'number'. ==== tests/cases/compiler/genericCloneReturnTypes2.ts (1 errors) ==== class MyList { public size: number; public data: T[]; constructor(n: number) { this.size = n; this.data = new Array(this.size); } public clone() { return new MyList(this.size); } } var a: MyList; var b: MyList = a.clone(); // ok var c: MyList = a.clone(); // bug was there was an error on this line var d: MyList = a.clone(); // error ~ !!! error TS2322: Type 'MyList' is not assignable to type 'MyList'. !!! error TS2322: Type 'string' is not assignable to type 'number'.