Skip to content

[Bug]: optional chain access to an enum declared in a different file compiles wrongly #9181

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

REPL

What is expected?

The output to not reference c_num and d_num or them to be declared.

What is actually happening?

The output to references c_num and d_num, which is not declared.

System Info

REPL 1.0.0-rc.16

Any additional comments?

esbuild try

Found in https://github.com/rolldown/rolldown/tree/main/crates/rolldown/tests/esbuild/ts/ts_enum_cross_module_inlining_access

Metadata

Metadata

Assignees

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions