mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
b887b30092
**Description:** This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
16 lines
442 B
TypeScript
16 lines
442 B
TypeScript
// @declaration: true
|
|
|
|
// An enum declaration that specifies a const modifier is a constant enum declaration.
|
|
// In a constant enum declaration, all members must have constant values and
|
|
// it is an error for a member declaration to specify an expression that isn't classified as a constant enum expression.
|
|
|
|
const enum E {
|
|
a = 10,
|
|
b = a,
|
|
c = (a+1),
|
|
e,
|
|
d = ~e,
|
|
f = a << 2 >> 1,
|
|
g = a << 2 >>> 1,
|
|
h = a | b
|
|
} |