Skip to content

Switch statement fully qualified enum type name #63

Closed

Description

@pwrightcertinia

whenValue on switch statements once again not working for all edge cases. When trying to match enum values this time. It also falls through the literal or id check and fails to parse the full value correctly if the enum type is not a single word. For example:

when Class.Enum.VALUE {}

This does not fit into whenLiteral correctly, and doesn't fit the syntax used for SObjects which is typeRef id so it picks "Class" as a name.

After fixing this, you can have an enum value detected as either a literal id or type so handling will get more complicated downstream.

ref switch docs

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions