<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">AFAICS, Andy needs not default implementations of Equatable, but cases-as-optional-properties—this topic has also been discussed on the list.</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important">enum Result {
    case success(Int)
    case failure(String)
}

let r: Result = foo()

let x: Int? = r.success
let y: String? = r.failure

assert(r.success == Optional(42))
assert(r.failure == nil)
</code></pre><div title="MDH:QUZBSUNTLCBBbmR5IG5lZWRzIG5vdCBkZWZhdWx0IGltcGxlbWVudGF0aW9ucyBvZiBFcXVhdGFi
bGUsIGJ1dCBjYXNlcy1hcy1vcHRpb25hbC1wcm9wZXJ0aWVzLS10aGlzIHRvcGljIGhhcyBhbHNv
IGJlZW4gZGlzY3Vzc2VkIG9uIHRoZSBsaXN0LjxkaXY+PGJyPjwvZGl2PjxkaXY+YGBgPC9kaXY+
PGRpdj5lbnVtIFJlc3VsdCB7PC9kaXY+PGRpdj4mbmJzcDsgJm5ic3A7IGNhc2Ugc3VjY2VzcyhJ
bnQpPC9kaXY+PGRpdj4mbmJzcDsgJm5ic3A7IGNhc2UgZmFpbHVyZShTdHJpbmcpPC9kaXY+PGRp
dj59PC9kaXY+PGRpdj48YnI+PC9kaXY+PGRpdj5sZXQgcjogUmVzdWx0ID0gZm9vKCk8L2Rpdj48
ZGl2Pjxicj48L2Rpdj48ZGl2PmxldCB4OiBJbnQ/ID0gci5zdWNjZXNzPC9kaXY+PGRpdj5sZXQg
eTogU3RyaW5nPyA9IHIuZmFpbHVyZTwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+YXNzZXJ0KHIu
c3VjY2VzcyA9PSBPcHRpb25hbCg0MikpPGJyPjwvZGl2PjxkaXY+YXNzZXJ0KHIuZmFpbHVyZSA9
PSBuaWwpPC9kaXY+PGRpdj5gYGA8L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div></div>