TypeScript/tests/baselines/reference/objectTypesIdentityWithPrivates2.symbols
2015-04-15 16:44:20 -07:00

116 lines
7.2 KiB
Plaintext

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