File: classSideInheritance3.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 (50 lines) | stat: -rw-r--r-- 1,696 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
=== tests/cases/compiler/classSideInheritance3.ts ===
class A {
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))

    constructor(public x: string) {
>x : Symbol(A.x, Decl(classSideInheritance3.ts, 1, 16))
    }
}
class B extends A {
>B : Symbol(B, Decl(classSideInheritance3.ts, 3, 1))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))

    constructor(x: string, public data: string) {
>x : Symbol(x, Decl(classSideInheritance3.ts, 5, 16))
>data : Symbol(B.data, Decl(classSideInheritance3.ts, 5, 26))

        super(x);
>super : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>x : Symbol(x, Decl(classSideInheritance3.ts, 5, 16))
    }
}
class C extends A {
>C : Symbol(C, Decl(classSideInheritance3.ts, 8, 1))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))

    constructor(x: string) {
>x : Symbol(x, Decl(classSideInheritance3.ts, 10, 16))

        super(x);
>super : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>x : Symbol(x, Decl(classSideInheritance3.ts, 10, 16))
    }
}

var r1: typeof A = B; // error
>r1 : Symbol(r1, Decl(classSideInheritance3.ts, 15, 3))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>B : Symbol(B, Decl(classSideInheritance3.ts, 3, 1))

var r2: new (x: string) => A = B; // error
>r2 : Symbol(r2, Decl(classSideInheritance3.ts, 16, 3))
>x : Symbol(x, Decl(classSideInheritance3.ts, 16, 13))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>B : Symbol(B, Decl(classSideInheritance3.ts, 3, 1))

var r3: typeof A = C; // ok
>r3 : Symbol(r3, Decl(classSideInheritance3.ts, 17, 3))
>A : Symbol(A, Decl(classSideInheritance3.ts, 0, 0))
>C : Symbol(C, Decl(classSideInheritance3.ts, 8, 1))