=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates2.ts === // object types are identical structurally class C { >C : C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) >T : T, Symbol(T, Decl(objectTypesIdentityWithPrivates2.ts, 2, 8)) private foo: T; >foo : T, Symbol(foo, Decl(objectTypesIdentityWithPrivates2.ts, 2, 12)) >T : T, Symbol(T, Decl(objectTypesIdentityWithPrivates2.ts, 2, 8)) } class D extends C { >D : D, Symbol(D, Decl(objectTypesIdentityWithPrivates2.ts, 4, 1)) >T : T, Symbol(T, Decl(objectTypesIdentityWithPrivates2.ts, 6, 8)) >C : C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) >T : T, Symbol(T, Decl(objectTypesIdentityWithPrivates2.ts, 6, 8)) } function foo1(x: C); >foo1 : { (x: C): any; (x: C): any; }, Symbol(foo1, Decl(objectTypesIdentityWithPrivates2.ts, 7, 1), Decl(objectTypesIdentityWithPrivates2.ts, 9, 28), Decl(objectTypesIdentityWithPrivates2.ts, 10, 28)) >x : C, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 9, 14)) >C : C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) function foo1(x: C); // ok >foo1 : { (x: C): any; (x: C): any; }, Symbol(foo1, Decl(objectTypesIdentityWithPrivates2.ts, 7, 1), Decl(objectTypesIdentityWithPrivates2.ts, 9, 28), Decl(objectTypesIdentityWithPrivates2.ts, 10, 28)) >x : C, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 10, 14)) >C : C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) function foo1(x: any) { } >foo1 : { (x: C): any; (x: C): any; }, Symbol(foo1, Decl(objectTypesIdentityWithPrivates2.ts, 7, 1), Decl(objectTypesIdentityWithPrivates2.ts, 9, 28), Decl(objectTypesIdentityWithPrivates2.ts, 10, 28)) >x : any, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 11, 14)) function foo2(x: D); >foo2 : { (x: D): any; (x: D): any; }, Symbol(foo2, Decl(objectTypesIdentityWithPrivates2.ts, 11, 25), Decl(objectTypesIdentityWithPrivates2.ts, 13, 28), Decl(objectTypesIdentityWithPrivates2.ts, 14, 28)) >x : D, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 13, 14)) >D : D, Symbol(D, Decl(objectTypesIdentityWithPrivates2.ts, 4, 1)) function foo2(x: D); // ok >foo2 : { (x: D): any; (x: D): any; }, Symbol(foo2, Decl(objectTypesIdentityWithPrivates2.ts, 11, 25), Decl(objectTypesIdentityWithPrivates2.ts, 13, 28), Decl(objectTypesIdentityWithPrivates2.ts, 14, 28)) >x : D, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 14, 14)) >D : D, Symbol(D, Decl(objectTypesIdentityWithPrivates2.ts, 4, 1)) function foo2(x: any) { } >foo2 : { (x: D): any; (x: D): any; }, Symbol(foo2, Decl(objectTypesIdentityWithPrivates2.ts, 11, 25), Decl(objectTypesIdentityWithPrivates2.ts, 13, 28), Decl(objectTypesIdentityWithPrivates2.ts, 14, 28)) >x : any, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 15, 14)) function foo3(x: C); >foo3 : { (x: C): any; (x: D): any; }, Symbol(foo3, Decl(objectTypesIdentityWithPrivates2.ts, 15, 25), Decl(objectTypesIdentityWithPrivates2.ts, 17, 28), Decl(objectTypesIdentityWithPrivates2.ts, 18, 28)) >x : C, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 17, 14)) >C : C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) function foo3(x: D); // ok >foo3 : { (x: C): any; (x: D): any; }, Symbol(foo3, Decl(objectTypesIdentityWithPrivates2.ts, 15, 25), Decl(objectTypesIdentityWithPrivates2.ts, 17, 28), Decl(objectTypesIdentityWithPrivates2.ts, 18, 28)) >x : D, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 18, 14)) >D : D, Symbol(D, Decl(objectTypesIdentityWithPrivates2.ts, 4, 1)) function foo3(x: any) { } >foo3 : { (x: C): any; (x: D): any; }, Symbol(foo3, Decl(objectTypesIdentityWithPrivates2.ts, 15, 25), Decl(objectTypesIdentityWithPrivates2.ts, 17, 28), Decl(objectTypesIdentityWithPrivates2.ts, 18, 28)) >x : any, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 19, 14)) function foo4(x: C): number; >foo4 : { (x: C): number; (x: D): string; }, Symbol(foo4, Decl(objectTypesIdentityWithPrivates2.ts, 19, 25), Decl(objectTypesIdentityWithPrivates2.ts, 21, 36), Decl(objectTypesIdentityWithPrivates2.ts, 22, 36)) >x : C, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 21, 14)) >C : C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) function foo4(x: D): string; // BUG 831926 >foo4 : { (x: C): number; (x: D): string; }, Symbol(foo4, Decl(objectTypesIdentityWithPrivates2.ts, 19, 25), Decl(objectTypesIdentityWithPrivates2.ts, 21, 36), Decl(objectTypesIdentityWithPrivates2.ts, 22, 36)) >x : D, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 22, 14)) >D : D, Symbol(D, Decl(objectTypesIdentityWithPrivates2.ts, 4, 1)) function foo4(x: any): any { } >foo4 : { (x: C): number; (x: D): string; }, Symbol(foo4, Decl(objectTypesIdentityWithPrivates2.ts, 19, 25), Decl(objectTypesIdentityWithPrivates2.ts, 21, 36), Decl(objectTypesIdentityWithPrivates2.ts, 22, 36)) >x : any, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 23, 14)) var r = foo4(new C()); >r : number, Symbol(r, Decl(objectTypesIdentityWithPrivates2.ts, 25, 3), Decl(objectTypesIdentityWithPrivates2.ts, 26, 3)) >foo4(new C()) : number >foo4 : { (x: C): number; (x: D): string; }, Symbol(foo4, Decl(objectTypesIdentityWithPrivates2.ts, 19, 25), Decl(objectTypesIdentityWithPrivates2.ts, 21, 36), Decl(objectTypesIdentityWithPrivates2.ts, 22, 36)) >new C() : C >C : typeof C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) var r = foo4(new D()); >r : number, Symbol(r, Decl(objectTypesIdentityWithPrivates2.ts, 25, 3), Decl(objectTypesIdentityWithPrivates2.ts, 26, 3)) >foo4(new D()) : number >foo4 : { (x: C): number; (x: D): string; }, Symbol(foo4, Decl(objectTypesIdentityWithPrivates2.ts, 19, 25), Decl(objectTypesIdentityWithPrivates2.ts, 21, 36), Decl(objectTypesIdentityWithPrivates2.ts, 22, 36)) >new D() : D >D : typeof D, Symbol(D, Decl(objectTypesIdentityWithPrivates2.ts, 4, 1)) function foo5(x: C): number; >foo5 : { (x: C): number; (x: C): string; }, Symbol(foo5, Decl(objectTypesIdentityWithPrivates2.ts, 26, 30), Decl(objectTypesIdentityWithPrivates2.ts, 28, 36), Decl(objectTypesIdentityWithPrivates2.ts, 29, 36)) >x : C, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 28, 14)) >C : C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) function foo5(x: C): string; // error >foo5 : { (x: C): number; (x: C): string; }, Symbol(foo5, Decl(objectTypesIdentityWithPrivates2.ts, 26, 30), Decl(objectTypesIdentityWithPrivates2.ts, 28, 36), Decl(objectTypesIdentityWithPrivates2.ts, 29, 36)) >x : C, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 29, 14)) >C : C, Symbol(C, Decl(objectTypesIdentityWithPrivates2.ts, 0, 0)) function foo5(x: any): any { } >foo5 : { (x: C): number; (x: C): string; }, Symbol(foo5, Decl(objectTypesIdentityWithPrivates2.ts, 26, 30), Decl(objectTypesIdentityWithPrivates2.ts, 28, 36), Decl(objectTypesIdentityWithPrivates2.ts, 29, 36)) >x : any, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 30, 14)) function foo6(x: D): number; >foo6 : { (x: D): number; (x: D): string; }, Symbol(foo6, Decl(objectTypesIdentityWithPrivates2.ts, 30, 30), Decl(objectTypesIdentityWithPrivates2.ts, 32, 36), Decl(objectTypesIdentityWithPrivates2.ts, 33, 36)) >x : D, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 32, 14)) >D : D, Symbol(D, Decl(objectTypesIdentityWithPrivates2.ts, 4, 1)) function foo6(x: D): string; // error >foo6 : { (x: D): number; (x: D): string; }, Symbol(foo6, Decl(objectTypesIdentityWithPrivates2.ts, 30, 30), Decl(objectTypesIdentityWithPrivates2.ts, 32, 36), Decl(objectTypesIdentityWithPrivates2.ts, 33, 36)) >x : D, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 33, 14)) >D : D, Symbol(D, Decl(objectTypesIdentityWithPrivates2.ts, 4, 1)) function foo6(x: any): any { } >foo6 : { (x: D): number; (x: D): string; }, Symbol(foo6, Decl(objectTypesIdentityWithPrivates2.ts, 30, 30), Decl(objectTypesIdentityWithPrivates2.ts, 32, 36), Decl(objectTypesIdentityWithPrivates2.ts, 33, 36)) >x : any, Symbol(x, Decl(objectTypesIdentityWithPrivates2.ts, 34, 14))