```typescript var x = 10; enum Merge { x = Math.random() } enum Merge { y = x // <-- refers to Merge.x } ``` This case wasn't covered in #8543 and by the [babel test case](e568916ef3/packages/babel-plugin-transform-typescript/test/fixtures/enum/non-constant-member-reference/input.ts). To handle it we still have to go through the scope ancestors. --------- Co-authored-by: Dunqing <dengqing0821@gmail.com>
e568916ef3/packages/babel-plugin-transform-typescript/test/fixtures/enum/non-constant-member-reference/input.ts
for await
super()
isStaticChildren
Fragment