Skip to content

Add support for Enums with associated values #1

@muuhoffman

Description

@muuhoffman

Say I have the following enum

enum UserField {
        case id(Int)
        case username(String)
        case vision(Int, Int)
        case height(feet: Int, inches: Int)
}

Then the following switch should be generated:

switch value {
case .id(let value):
    break
case .username(let username):
    break
case .vision(let value1, let value2):
    break
case .height(let feet, let inches):
    break
}

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