File: enumAssignmentCompat2.types

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 (116 lines) | stat: -rw-r--r-- 1,310 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
=== tests/cases/compiler/enumAssignmentCompat2.ts ===
enum W {
>W : W

    a, b, c,
>a : W.a
>b : W.b
>c : W.c

}

module W {
>W : typeof W

    export class D { }
>D : D
}

interface WStatic {

    a: W;
>a : W

    b: W;
>b : W

    c: W;
>c : W

}



var x: WStatic = W;
>x : WStatic
>W : typeof W

var y: typeof W = W;
>y : typeof W
>W : typeof W
>W : typeof W

var z: number = W; // error
>z : number
>W : typeof W

var a: number = W.a;
>a : number
>W.a : W.a
>W : typeof W
>a : W.a

var b: typeof W = W.a; // error
>b : typeof W
>W : typeof W
>W.a : W.a
>W : typeof W
>a : W.a

var c: typeof W.a = W.a;
>c : W.a
>W.a : W.a
>W : typeof W
>a : W.a
>W.a : W.a
>W : typeof W
>a : W.a

var d: typeof W = 3; // error
>d : typeof W
>W : typeof W
>3 : 3

var e: typeof W.a = 4;
>e : W.a
>W.a : W.a
>W : typeof W
>a : W.a
>4 : 4

var f: WStatic = W.a; // error
>f : WStatic
>W.a : W.a
>W : typeof W
>a : W.a

var g: WStatic = 5; // error
>g : WStatic
>5 : 5

var h: W = 3;
>h : W
>3 : 3

var i: W = W.a;
>i : W
>W.a : W.a
>W : typeof W
>a : W.a

i = W.a;
>i = W.a : W.a
>i : W
>W.a : W.a
>W : typeof W
>a : W.a

W.D;
>W.D : typeof W.D
>W : typeof W
>D : typeof W.D

var p: W.D;
>p : W.D
>W : any