Skip to content

Treat enum_literal completion as error completion when switching on error #2624

@psznm

Description

@psznm

Remember to search before filing a new report

In #2619 completions for errors in switch have been added when error_access is detected.

Proposal is that the example below, when enum_literal is detected, should also suggest the error values.

        const err: error{E1, E2} = undefined;
        switch(err) {
            .<cursor>
        }

Not having to write out the error. and needing only . is extremely pleasant feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions