=== tests/cases/compiler/promisesWithConstraints.ts === interface Promise { >Promise : Promise >T : T then(cb: (x: T) => Promise): Promise; >then : (cb: (x: T) => Promise) => Promise >U : U >cb : (x: T) => Promise >x : T >T : T >Promise : Promise >U : U >Promise : Promise >U : U } interface CPromise { >CPromise : CPromise >T : T >x : any then(cb: (x: T) => Promise): Promise; >then : (cb: (x: T) => Promise) => Promise >U : U >x : any >cb : (x: T) => Promise >x : T >T : T >Promise : Promise >U : U >Promise : Promise >U : U } interface Foo { x; } >Foo : Foo >x : any interface Bar { x; y; } >Bar : Bar >x : any >y : any var a: Promise; >a : Promise >Promise : Promise >Foo : Foo var b: Promise; >b : Promise >Promise : Promise >Bar : Bar a = b; // ok >a = b : Promise >a : Promise >b : Promise b = a; // ok >b = a : Promise >b : Promise >a : Promise var a2: CPromise; >a2 : CPromise >CPromise : CPromise >Foo : Foo var b2: CPromise; >b2 : CPromise >CPromise : CPromise >Bar : Bar a2 = b2; // ok >a2 = b2 : CPromise >a2 : CPromise >b2 : CPromise b2 = a2; // was error >b2 = a2 : CPromise >b2 : CPromise >a2 : CPromise