=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts === // Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those // parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required, // optional or rest) and types, and identical return types. class A { >A : A, Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 0, 0)) foo(x: T, y?: U): T { return null; } >foo : (x: T, y?: U) => T, Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 4, 9)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 5, 8)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 5, 10)) >x : T, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 5, 14)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 5, 8)) >y : U, Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 5, 19)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 5, 10)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 5, 8)) >null : null } class B { >B : B, Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 6, 1)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 8, 8)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 8, 10)) foo(x: T, y?: U): T { return null; } >foo : (x: T, y?: U) => T, Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 8, 15)) >x : T, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 9, 8)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 8, 8)) >y : U, Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 9, 13)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 8, 10)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 8, 8)) >null : null } class C { >C : C, Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 10, 1)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 12, 8)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 12, 10)) foo(x: T, y?: U): T { return null; } >foo : (x: T, y?: U) => T, Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 12, 15)) >x : T, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 13, 8)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 12, 8)) >y : U, Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 13, 13)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 12, 10)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 12, 8)) >null : null } interface I { >I : I, Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 14, 1)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 16, 12)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 16, 14)) foo(x: T, y?: U): T; >foo : (x: T, y?: U) => T, Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 16, 19)) >x : T, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 17, 8)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 16, 12)) >y : U, Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 17, 13)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 16, 14)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 16, 12)) } interface I2 { >I2 : I2, Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 18, 1)) foo(x: T, y?: U): T; >foo : (x: T, y?: U) => T, Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 20, 14)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 21, 8)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 21, 10)) >x : T, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 21, 14)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 21, 8)) >y : U, Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 21, 19)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 21, 10)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 21, 8)) } var a: { foo(x: T, y?: U): T } >a : { foo(x: T, y?: U): T; }, Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 3)) >foo : (x: T, y?: U) => T, Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 8)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 13)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 15)) >x : T, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 19)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 13)) >y : U, Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 24)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 15)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 13)) var b = { foo(x: T, y?: U) { return x; } }; >b : { foo(x: T, y?: U): T; }, Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 3)) >{ foo(x: T, y?: U) { return x; } } : { foo(x: T, y?: U): T; } >foo : (x: T, y?: U) => T, Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 9)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 14)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 16)) >x : T, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 20)) >T : T, Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 14)) >y : U, Symbol(y, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 25)) >U : U, Symbol(U, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 16)) >x : T, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 20)) function foo1(x: A); >foo1 : { (x: A): any; (x: A): any; }, Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 49), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 27, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 28, 20)) >x : A, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 27, 14)) >A : A, Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 0, 0)) function foo1(x: A); // error >foo1 : { (x: A): any; (x: A): any; }, Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 49), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 27, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 28, 20)) >x : A, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 28, 14)) >A : A, Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 0, 0)) function foo1(x: any) { } >foo1 : { (x: A): any; (x: A): any; }, Symbol(foo1, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 49), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 27, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 28, 20)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 29, 14)) function foo1b(x: B); >foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 31, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 32, 37)) >x : B, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 31, 15)) >B : B, Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 6, 1)) function foo1b(x: B); // error >foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 31, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 32, 37)) >x : B, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 32, 15)) >B : B, Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 6, 1)) function foo1b(x: any) { } >foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 31, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 32, 37)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 33, 15)) function foo1c(x: C); >foo1c : { (x: C): any; (x: C): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 35, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 36, 37)) >x : C, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 35, 15)) >C : C, Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 10, 1)) function foo1c(x: C); // error >foo1c : { (x: C): any; (x: C): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 35, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 36, 37)) >x : C, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 36, 15)) >C : C, Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 10, 1)) function foo1c(x: any) { } >foo1c : { (x: C): any; (x: C): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 35, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 36, 37)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 37, 15)) function foo2(x: I); >foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 39, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 40, 36)) >x : I, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 39, 14)) >I : I, Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 14, 1)) function foo2(x: I); // error >foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 39, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 40, 36)) >x : I, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 40, 14)) >I : I, Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 14, 1)) function foo2(x: any) { } >foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 39, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 40, 36)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 41, 14)) function foo3(x: typeof a); >foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 41, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 43, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 44, 27)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 43, 14)) >a : { foo(x: T, y?: U): T; }, Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 3)) function foo3(x: typeof a); // error >foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 41, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 43, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 44, 27)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 44, 14)) >a : { foo(x: T, y?: U): T; }, Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 3)) function foo3(x: any) { } >foo3 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo3, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 41, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 43, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 44, 27)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 45, 14)) function foo4(x: typeof b); >foo4 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 45, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 47, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 48, 27)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 47, 14)) >b : { foo(x: T, y?: U): T; }, Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 3)) function foo4(x: typeof b); // error >foo4 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 45, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 47, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 48, 27)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 48, 14)) >b : { foo(x: T, y?: U): T; }, Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 3)) function foo4(x: any) { } >foo4 : { (x: { foo(x: T, y?: U): T; }): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo4, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 45, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 47, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 48, 27)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 49, 14)) function foo5(x: A); >foo5 : { (x: A): any; (x: B): any; }, Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 51, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 52, 36)) >x : A, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 51, 14)) >A : A, Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 0, 0)) function foo5(x: B); // ok >foo5 : { (x: A): any; (x: B): any; }, Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 51, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 52, 36)) >x : B, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 52, 14)) >B : B, Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 6, 1)) function foo5(x: any) { } >foo5 : { (x: A): any; (x: B): any; }, Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 51, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 52, 36)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 53, 14)) function foo5b(x: A); >foo5b : { (x: A): any; (x: C): any; }, Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 56, 37)) >x : A, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 55, 15)) >A : A, Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 0, 0)) function foo5b(x: C); // ok >foo5b : { (x: A): any; (x: C): any; }, Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 56, 37)) >x : C, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 56, 15)) >C : C, Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 10, 1)) function foo5b(x: any) { } >foo5b : { (x: A): any; (x: C): any; }, Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 56, 37)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 57, 15)) function foo6(x: A); >foo6 : { (x: A): any; (x: I): any; }, Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 57, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 59, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 60, 36)) >x : A, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 59, 14)) >A : A, Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 0, 0)) function foo6(x: I); // ok >foo6 : { (x: A): any; (x: I): any; }, Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 57, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 59, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 60, 36)) >x : I, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 60, 14)) >I : I, Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 14, 1)) function foo6(x: any) { } >foo6 : { (x: A): any; (x: I): any; }, Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 57, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 59, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 60, 36)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 61, 14)) function foo7(x: A); >foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 61, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 63, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 64, 27)) >x : A, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 63, 14)) >A : A, Symbol(A, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 0, 0)) function foo7(x: typeof a); // no error, bug? >foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 61, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 63, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 64, 27)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 64, 14)) >a : { foo(x: T, y?: U): T; }, Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 3)) function foo7(x: any) { } >foo7 : { (x: A): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo7, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 61, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 63, 20), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 64, 27)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 65, 14)) function foo8(x: B); >foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 67, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 68, 36)) >x : B, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 67, 14)) >B : B, Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 6, 1)) function foo8(x: I); // error >foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 67, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 68, 36)) >x : I, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 68, 14)) >I : I, Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 14, 1)) function foo8(x: any) { } >foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 67, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 68, 36)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 69, 14)) function foo9(x: B); >foo9 : { (x: B): any; (x: C): any; }, Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 71, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 72, 36)) >x : B, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 71, 14)) >B : B, Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 6, 1)) function foo9(x: C); // error >foo9 : { (x: B): any; (x: C): any; }, Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 71, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 72, 36)) >x : C, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 72, 14)) >C : C, Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 10, 1)) function foo9(x: any) { } >foo9 : { (x: B): any; (x: C): any; }, Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 71, 36), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 72, 36)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 73, 14)) function foo10(x: B); >foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 75, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 76, 28)) >x : B, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 75, 15)) >B : B, Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 6, 1)) function foo10(x: typeof a); // ok >foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 75, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 76, 28)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 76, 15)) >a : { foo(x: T, y?: U): T; }, Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 3)) function foo10(x: any) { } >foo10 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 75, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 76, 28)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 77, 15)) function foo11(x: B); >foo11 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 77, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 79, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 80, 28)) >x : B, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 79, 15)) >B : B, Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 6, 1)) function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 77, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 79, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 80, 28)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 80, 15)) >b : { foo(x: T, y?: U): T; }, Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 3)) function foo11(x: any) { } >foo11 : { (x: B): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 77, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 79, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 80, 28)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 81, 15)) function foo12(x: I); >foo12 : { (x: I): any; (x: C): any; }, Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 83, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 84, 37)) >x : I, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 83, 15)) >I : I, Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 14, 1)) function foo12(x: C); // error >foo12 : { (x: I): any; (x: C): any; }, Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 83, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 84, 37)) >x : C, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 84, 15)) >C : C, Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 10, 1)) function foo12(x: any) { } >foo12 : { (x: I): any; (x: C): any; }, Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 83, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 84, 37)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 85, 15)) function foo12b(x: I2); >foo12b : { (x: I2): any; (x: C): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 88, 38)) >x : I2, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 87, 16)) >I2 : I2, Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 18, 1)) function foo12b(x: C); // ok >foo12b : { (x: I2): any; (x: C): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 88, 38)) >x : C, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 88, 16)) >C : C, Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 10, 1)) function foo12b(x: any) { } >foo12b : { (x: I2): any; (x: C): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 88, 38)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 89, 16)) function foo13(x: I); >foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 89, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 91, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 92, 28)) >x : I, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 91, 15)) >I : I, Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 14, 1)) function foo13(x: typeof a); // ok >foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 89, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 91, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 92, 28)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 92, 15)) >a : { foo(x: T, y?: U): T; }, Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 24, 3)) function foo13(x: any) { } >foo13 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 89, 27), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 91, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 92, 28)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 93, 15)) function foo14(x: I); >foo14 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 95, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 96, 28)) >x : I, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 95, 15)) >I : I, Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 14, 1)) function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 95, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 96, 28)) >x : { foo(x: T, y?: U): T; }, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 96, 15)) >b : { foo(x: T, y?: U): T; }, Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 25, 3)) function foo14(x: any) { } >foo14 : { (x: I): any; (x: { foo(x: T, y?: U): T; }): any; }, Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 95, 37), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 96, 28)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 97, 15)) function foo15(x: I2); >foo15 : { (x: I2): any; (x: C): any; }, Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 100, 37)) >x : I2, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 99, 15)) >I2 : I2, Symbol(I2, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 18, 1)) function foo15(x: C); // ok >foo15 : { (x: I2): any; (x: C): any; }, Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 100, 37)) >x : C, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 100, 15)) >C : C, Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 10, 1)) function foo15(x: any) { } >foo15 : { (x: I2): any; (x: C): any; }, Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 100, 37)) >x : any, Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesOptionalParams2.ts, 101, 15))