[swift-evolution] The Non-Exhaustive Enums proposal kills one of Swift's top features - change proposal

Brent Royal-Gordon brent at architechies.com
Fri Dec 22 18:28:23 CST 2017

> On Dec 21, 2017, at 10:33 AM, Jordan Rose via swift-evolution <swift-evolution at swift.org> wrote:
> The main blocker was that such a case becomes untestable (see also "Testing invalid cases").

You can always make it testable through appropriate factoring—for example, have the `future` case call a helper function, and then explicitly invoke that helper function to test its behavior. That won't give you coverage of the `future` case itself, but there's nothing on the table that will (not even `default` when all the existing cases are covered).

Brent Royal-Gordon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171222/961774c2/attachment.html>

More information about the swift-evolution mailing list