==== tests/cases/compiler/promiseIdentity2.ts (1 errors) ==== interface IPromise { then(callback: (x: T) => IPromise): IPromise; } interface Promise { then(callback: (x: T) => Promise): Promise; } // error because T is string in the first declaration, and T is boolean in the second // Return type and callback return type are ok because T is any in this particular Promise var x: IPromise; var x: Promise; ~ !!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'IPromise', but here has type 'Promise'.