File: inheritance.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 (64 lines) | stat: -rw-r--r-- 1,519 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
63
64
=== tests/cases/compiler/inheritance.ts ===
class B1 {
>B1 : Symbol(B1, Decl(inheritance.ts, 0, 0))

    public x;
>x : Symbol(B1.x, Decl(inheritance.ts, 0, 10))
}

class B2 {
>B2 : Symbol(B2, Decl(inheritance.ts, 2, 1))

    public x;
>x : Symbol(B2.x, Decl(inheritance.ts, 4, 10))
}


class D1 extends B1 {
>D1 : Symbol(D1, Decl(inheritance.ts, 6, 1))
>B1 : Symbol(B1, Decl(inheritance.ts, 0, 0))
}

class D2 extends B2 {
>D2 : Symbol(D2, Decl(inheritance.ts, 10, 1))
>B2 : Symbol(B2, Decl(inheritance.ts, 2, 1))
}


class N {
>N : Symbol(N, Decl(inheritance.ts, 13, 1))

    public y:number;
>y : Symbol(N.y, Decl(inheritance.ts, 16, 9))
}

class ND extends N { // any is assignable to number
>ND : Symbol(ND, Decl(inheritance.ts, 18, 1))
>N : Symbol(N, Decl(inheritance.ts, 13, 1))

    public y;
>y : Symbol(ND.y, Decl(inheritance.ts, 20, 20))
}

class Good {
>Good : Symbol(Good, Decl(inheritance.ts, 22, 1))

    public f: () => number = function () { return 0; }
>f : Symbol(Good.f, Decl(inheritance.ts, 24, 12))

    public g() { return 0; }
>g : Symbol(Good.g, Decl(inheritance.ts, 25, 54))
}

class Baad extends Good {
>Baad : Symbol(Baad, Decl(inheritance.ts, 27, 1))
>Good : Symbol(Good, Decl(inheritance.ts, 22, 1))

    public f(): number { return 0; }
>f : Symbol(Baad.f, Decl(inheritance.ts, 29, 25))

    public g(n: number) { return 0; }
>g : Symbol(Baad.g, Decl(inheritance.ts, 30, 36))
>n : Symbol(n, Decl(inheritance.ts, 31, 13))
}