Skip to content

Enum cases that are unit should have no associated value - #93

Merged
adam-fowler merged 1 commit into
mainfrom
unit-enum-case
Aug 18, 2025
Merged

Enum cases that are unit should have no associated value#93
adam-fowler merged 1 commit into
mainfrom
unit-enum-case

Conversation

@adam-fowler

Copy link
Copy Markdown
Member

Union members which have a unit type should have no associated type when rendered as enums with associated types.

eg

public enum EventFilter: AWSEncodableShape & AWSDecodableShape, Sendable {
        case all
        case include([Event])
}

instead of

public enum EventFilter: AWSEncodableShape & AWSDecodableShape, Sendable {
        case all(Void)
        case include([Event])
}

@adam-fowler
adam-fowler requested a review from 0xTim August 15, 2025 16:32
@adam-fowler
adam-fowler merged commit 5f1771f into main Aug 18, 2025
4 checks passed
@adam-fowler
adam-fowler deleted the unit-enum-case branch August 18, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants