mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
This is necessary so that other constant globals referencing constant globals can be precomputed as well (NON_STANDALONE_FLOW in binaryen)
30 lines
289 B
TypeScript
30 lines
289 B
TypeScript
export enum Implicit {
|
|
ZERO,
|
|
ONE,
|
|
TWO,
|
|
THREE
|
|
}
|
|
|
|
export enum Explicit {
|
|
ZERO = 0,
|
|
ONE = 0 + 1,
|
|
TWO = 1 + 1,
|
|
THREE = 3
|
|
}
|
|
|
|
export enum Mixed {
|
|
ZERO,
|
|
ONE,
|
|
THREE = 3,
|
|
FOUR
|
|
}
|
|
|
|
function getZero(): i32 {
|
|
return 0;
|
|
}
|
|
|
|
export enum NonConstant {
|
|
ZERO = getZero(),
|
|
ONE
|
|
}
|