File: forwardRefInEnum.js

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 683 bytes parent folder | download | duplicates (2)
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
//// [forwardRefInEnum.ts]
enum E1 {
    // illegal case
    // forward reference to the element of the same enum
    X = Y, 
    X1 = E1["Y"], 
    // forward reference to the element of the same enum
    Y = E1.Z,
    Y1 = E1["Z"]
}

enum E1 {
    Z = 4    
}


//// [forwardRefInEnum.js]
var E1;
(function (E1) {
    // illegal case
    // forward reference to the element of the same enum
    E1[E1["X"] = E1.Y] = "X";
    E1[E1["X1"] = E1["Y"]] = "X1";
    // forward reference to the element of the same enum
    E1[E1["Y"] = E1.Z] = "Y";
    E1[E1["Y1"] = E1["Z"]] = "Y1";
})(E1 || (E1 = {}));
(function (E1) {
    E1[E1["Z"] = 4] = "Z";
})(E1 || (E1 = {}));