File: objectTypesIdentityWithPrivates3.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (62 lines) | stat: -rw-r--r-- 2,475 bytes parent folder | download | duplicates (5)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithPrivates3.ts ===
interface T1 { }
>T1 : Symbol(T1, Decl(objectTypesIdentityWithPrivates3.ts, 0, 0))

interface T2 { z }
>T2 : Symbol(T2, Decl(objectTypesIdentityWithPrivates3.ts, 0, 16))
>z : Symbol(T2.z, Decl(objectTypesIdentityWithPrivates3.ts, 1, 14))

class C1<T> {
>C1 : Symbol(C1, Decl(objectTypesIdentityWithPrivates3.ts, 1, 18))
>T : Symbol(T, Decl(objectTypesIdentityWithPrivates3.ts, 3, 9))

    private x;
>x : Symbol(C1.x, Decl(objectTypesIdentityWithPrivates3.ts, 3, 13))
}

class C2 extends C1<T1> {
>C2 : Symbol(C2, Decl(objectTypesIdentityWithPrivates3.ts, 5, 1))
>C1 : Symbol(C1, Decl(objectTypesIdentityWithPrivates3.ts, 1, 18))
>T1 : Symbol(T1, Decl(objectTypesIdentityWithPrivates3.ts, 0, 0))

    y;
>y : Symbol(C2.y, Decl(objectTypesIdentityWithPrivates3.ts, 7, 25))
}

var c1: C1<T2>;
>c1 : Symbol(c1, Decl(objectTypesIdentityWithPrivates3.ts, 11, 3))
>C1 : Symbol(C1, Decl(objectTypesIdentityWithPrivates3.ts, 1, 18))
>T2 : Symbol(T2, Decl(objectTypesIdentityWithPrivates3.ts, 0, 16))

<C2>c1; // Should succeed (private x originates in the same declaration)
>C2 : Symbol(C2, Decl(objectTypesIdentityWithPrivates3.ts, 5, 1))
>c1 : Symbol(c1, Decl(objectTypesIdentityWithPrivates3.ts, 11, 3))


class C3<T> {
>C3 : Symbol(C3, Decl(objectTypesIdentityWithPrivates3.ts, 12, 7))
>T : Symbol(T, Decl(objectTypesIdentityWithPrivates3.ts, 15, 9))

    private x: T; // This T is the difference between C3 and C1
>x : Symbol(C3.x, Decl(objectTypesIdentityWithPrivates3.ts, 15, 13))
>T : Symbol(T, Decl(objectTypesIdentityWithPrivates3.ts, 15, 9))
}

class C4 extends C3<T1> {
>C4 : Symbol(C4, Decl(objectTypesIdentityWithPrivates3.ts, 17, 1))
>C3 : Symbol(C3, Decl(objectTypesIdentityWithPrivates3.ts, 12, 7))
>T1 : Symbol(T1, Decl(objectTypesIdentityWithPrivates3.ts, 0, 0))

    y;
>y : Symbol(C4.y, Decl(objectTypesIdentityWithPrivates3.ts, 19, 25))
}

var c3: C3<T2>;
>c3 : Symbol(c3, Decl(objectTypesIdentityWithPrivates3.ts, 23, 3))
>C3 : Symbol(C3, Decl(objectTypesIdentityWithPrivates3.ts, 12, 7))
>T2 : Symbol(T2, Decl(objectTypesIdentityWithPrivates3.ts, 0, 16))

<C4>c3; // Should fail (private x originates in the same declaration, but different types)
>C4 : Symbol(C4, Decl(objectTypesIdentityWithPrivates3.ts, 17, 1))
>c3 : Symbol(c3, Decl(objectTypesIdentityWithPrivates3.ts, 23, 3))