Skip to content

Interpreter fails to read an earlier member through its enum name during initialization #3595

Closed

Description

@nickna

Run with --no-tsconfig --noLib.

enum E { A = 2, B = E.A + 1 }
console.log(E.B);

The saved compiled output prints 3 and passes IL verification. The interpreter throws ReferenceError: Undefined variable 'E'. The initializer should be able to read members already installed on the enum object. This is the qualified access case related to #3563.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions