1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts ===
interface A {
<T extends {
<S extends A>(x: T, y: S): void
>x : T
>y : S
}>(x: T, y: T): void
>x : T
>y : T
}
interface B {
<U extends B>(x: U, y: U): void
>x : U
>y : U
}
// ok, not considered identical because the steps of contextual signature instantiation create fresh type parameters
function foo(x: A);
>foo : { (x: A): any; (x: B): any; }
>x : A
function foo(x: B); // error after constraints above made illegal
>foo : { (x: A): any; (x: B): any; }
>x : B
function foo(x: any) { }
>foo : { (x: A): any; (x: B): any; }
>x : any
|