Skip to content

Codefix to remove unreachable enum is wrong #25700

Closed
@ghost

Description

TypeScript Version: 3.0.0-dev.20180712

Code

function f() {
    return E.A;
    enum E { A }
}

Expected behavior:

No codefix, or codefix to move E out of the function.

Actual behavior:

Codefix removes E.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Quick FixesEditor-provided fixes, often called code actions.Help WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions