-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Labels
area/generatorAffects: plugin, CLI, config file.Affects: plugin, CLI, config file.kind/enhancementImprovements to existing feature.Improvements to existing feature.size/SSmall task. (A couple of hours of work.)Small task. (A couple of hours of work.)
Description
Since it's not expected that the generated code should support library evolution, we could add @Frozen to all of the generated enums. This would greatly improve the ergonomics of switching over enums in the generated code.
Borrowing an example from another issue:
switch result {
case let .ok(reponse):
case let .json(payload):
print(payload.body, payload.headers)
@unknown default:
break
}
@unknown default:
break
} would become
switch result {
case let .ok(reponse):
case let .json(payload):
print(payload.body, payload.headers)
}
} Metadata
Metadata
Assignees
Labels
area/generatorAffects: plugin, CLI, config file.Affects: plugin, CLI, config file.kind/enhancementImprovements to existing feature.Improvements to existing feature.size/SSmall task. (A couple of hours of work.)Small task. (A couple of hours of work.)