TypeScript/tests/cases/compiler/forwardRefInEnum.ts

14 lines
248 B
TypeScript
Raw Normal View History

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
}