File: baseCheck.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (96 lines) | stat: -rw-r--r-- 1,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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
=== tests/cases/compiler/baseCheck.ts ===
class C { constructor(x: number, y: number) { } }
>C : C
>x : number
>y : number

class ELoc extends C {
>ELoc : ELoc
>C : C

    constructor(x: number) {
>x : number

        super(0, x);
>super(0, x) : void
>super : typeof C
>0 : 0
>x : number
    }
}
class ELocVar extends C {  
>ELocVar : ELocVar
>C : C

    constructor(x: number) {
>x : number

        super(0, loc);
>super(0, loc) : void
>super : typeof C
>0 : 0
>loc : any
    }

    m() {
>m : () => void

        var loc=10;
>loc : number
>10 : 10
    }
}

class D extends C { constructor(public z: number) { super(this.z) }  } // too few params
>D : D
>C : C
>z : number
>super(this.z) : void
>super : typeof C
>this.z : number
>this : this
>z : number

class E extends C { constructor(public z: number) { super(0, this.z) } }
>E : E
>C : C
>z : number
>super(0, this.z) : void
>super : typeof C
>0 : 0
>this.z : number
>this : this
>z : number

class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type
>F : F
>C : C
>z : number
>super("hello", this.z) : void
>super : typeof C
>"hello" : "hello"
>this.z : number
>this : this
>z : number

function f() {
>f : () => void

    if (x<10) {
>x<10 : boolean
>x : any
>10 : 10

      x=11;
>x=11 : 11
>x : any
>11 : 11
    }
    else {
        x=12;
>x=12 : 12
>x : any
>12 : 12
    }
}