pointfreeco / swift-case-paths

🧰 Case paths extends the key path hierarchy to enum cases.
https://www.pointfree.co/collections/enums-and-structs/case-paths
MIT License
904 stars 105 forks source link

Avoid warning when embedding `Never` cases #179

Closed stephencelis closed 1 month ago

stephencelis commented 2 months ago

Sendability meant losing the Enum.case shorthand for { Enum.case($0) }, which meant introducing a warning when type(of: $0) == Never.self. Looks like we can suppress this warning, though, and it also luckily looks like this only affects embedding Never directly (embedding enums that only contain Never does not trigger a warning).