File: enumMergingErrors.js

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 (129 lines) | stat: -rw-r--r-- 3,203 bytes parent folder | download | duplicates (7)
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
117
118
119
120
121
122
123
124
125
126
127
128
129
//// [enumMergingErrors.ts]
// Enum with constant, computed, constant members split across 3 declarations with the same root module
module M {
    export enum E1 { A = 0 }
    export enum E2 { C }
    export enum E3 { A = 0 }
}
module M {
    export enum E1 { B = 'foo'.length }
    export enum E2 { B = 'foo'.length }
    export enum E3 { C }
}
module M {
    export enum E1 { C }
    export enum E2 { A = 0 }
    export enum E3 { B = 'foo'.length }
}

// Enum with no initializer in either declaration with constant members with the same root module
module M1 {
    export enum E1 { A = 0 }
}
module M1 {
    export enum E1 { B }
}
module M1 {
    export enum E1 { C }
}


// Enum with initializer in only one of three declarations with constant members with the same root module
module M2 {
    export enum E1 { A }
}
module M2 {
    export enum E1 { B = 0 }
}
module M2 {
    export enum E1 { C }
}




//// [enumMergingErrors.js]
// Enum with constant, computed, constant members split across 3 declarations with the same root module
var M;
(function (M) {
    var E1;
    (function (E1) {
        E1[E1["A"] = 0] = "A";
    })(E1 = M.E1 || (M.E1 = {}));
    var E2;
    (function (E2) {
        E2[E2["C"] = 0] = "C";
    })(E2 = M.E2 || (M.E2 = {}));
    var E3;
    (function (E3) {
        E3[E3["A"] = 0] = "A";
    })(E3 = M.E3 || (M.E3 = {}));
})(M || (M = {}));
(function (M) {
    var E1;
    (function (E1) {
        E1[E1["B"] = 'foo'.length] = "B";
    })(E1 = M.E1 || (M.E1 = {}));
    var E2;
    (function (E2) {
        E2[E2["B"] = 'foo'.length] = "B";
    })(E2 = M.E2 || (M.E2 = {}));
    var E3;
    (function (E3) {
        E3[E3["C"] = 0] = "C";
    })(E3 = M.E3 || (M.E3 = {}));
})(M || (M = {}));
(function (M) {
    var E1;
    (function (E1) {
        E1[E1["C"] = 0] = "C";
    })(E1 = M.E1 || (M.E1 = {}));
    var E2;
    (function (E2) {
        E2[E2["A"] = 0] = "A";
    })(E2 = M.E2 || (M.E2 = {}));
    var E3;
    (function (E3) {
        E3[E3["B"] = 'foo'.length] = "B";
    })(E3 = M.E3 || (M.E3 = {}));
})(M || (M = {}));
// Enum with no initializer in either declaration with constant members with the same root module
var M1;
(function (M1) {
    var E1;
    (function (E1) {
        E1[E1["A"] = 0] = "A";
    })(E1 = M1.E1 || (M1.E1 = {}));
})(M1 || (M1 = {}));
(function (M1) {
    var E1;
    (function (E1) {
        E1[E1["B"] = 0] = "B";
    })(E1 = M1.E1 || (M1.E1 = {}));
})(M1 || (M1 = {}));
(function (M1) {
    var E1;
    (function (E1) {
        E1[E1["C"] = 0] = "C";
    })(E1 = M1.E1 || (M1.E1 = {}));
})(M1 || (M1 = {}));
// Enum with initializer in only one of three declarations with constant members with the same root module
var M2;
(function (M2) {
    var E1;
    (function (E1) {
        E1[E1["A"] = 0] = "A";
    })(E1 = M2.E1 || (M2.E1 = {}));
})(M2 || (M2 = {}));
(function (M2) {
    var E1;
    (function (E1) {
        E1[E1["B"] = 0] = "B";
    })(E1 = M2.E1 || (M2.E1 = {}));
})(M2 || (M2 = {}));
(function (M2) {
    var E1;
    (function (E1) {
        E1[E1["C"] = 0] = "C";
    })(E1 = M2.E1 || (M2.E1 = {}));
})(M2 || (M2 = {}));