<div dir="ltr">Let's not bring bikeshedding the commonly proposed and rejected union spelling into this.<div>Typed throws would be a nice addition, assuming that the core team finds it in scope for phase 2. It seems only logical that any type can be thrown (i.e. conforms to Error) should be permitted to be listed in `throws()`.<br></div><div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 17, 2017 at 1:18 PM, Adrian Zubarev via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="m_1653627348615050552bloop_markdown"><p>That’s what I thought too. That’s also the case I showed a simple example how we could solve the giant list with a typealias even if the pipe <code>|</code> operator would be exclusive for anything that conforms to <code>Error</code>.</p>
<p></p></div><div class="m_1653627348615050552bloop_original_html"><span class=""><div id="m_1653627348615050552bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div> <br> <div id="m_1653627348615050552bloop_sign_1487359011504078848" class="m_1653627348615050552bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Adrian Zubarev<br>Sent with Airmail</div></div> <br></span><div><div class="h5"><p class="m_1653627348615050552airmail_on">Am 17. Februar 2017 um 20:16:30, Anton Zhilin (<a href="mailto:antonyzhilin@gmail.com" target="_blank">antonyzhilin@gmail.com</a>) schrieb:</p> <blockquote type="cite" class="m_1653627348615050552clean_bq"><span><div><div></div><div>
<div dir="ltr">
<div class="m_1653627348615050552markdown-here-wrapper">
<p style="margin:0px 0px 1.2em!important">2017-02-17 22:12
GMT+03:00 Adrian Zubarev via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>>:</p>
<p style="margin:0px 0px 1.2em!important"></p>
<div class="m_1653627348615050552markdown-here-exclude">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div class="m_1653627348615050552m_7486315314052609371bloop_markdown">
<p>Is the throwing type always a protocol? In your example it is,
but is this going to be always the case?</p>
</div>
</div>
</blockquote>
</div>
<p style="margin:0px 0px 1.2em!important"></p>
<p style="margin:0px 0px 1.2em!important">I thought it was going to
be any one subtype of <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">
Error</code>, be it a struct, an enum, or a protocol existential,
or <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">
Error</code> itself.</p>
<div title="MDH:PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPjxkaXYgY2xhc3M9ImdtYWlsX3F1b3RlIj4yMDE3LTAy LTE3IDIyOjEyIEdNVCswMzowMCBBZHJpYW4gWnViYXJldiB2aWEgc3dpZnQtZXZvbHV0aW9uIDxz cGFuIGRpcj0ibHRyIj4mbHQ7PGEgaHJlZj0ibWFpbHRvOnN3aWZ0LWV2b2x1dGlvbkBzd2lmdC5v cmciIHRhcmdldD0iX2JsYW5rIj5zd2lmdC1ldm9sdXRpb25Ac3dpZnQub3JnPC9hPiZndDs8L3Nw YW4+Ojxicj48YmxvY2txdW90ZSBjbGFzcz0iZ21haWxfcXVvdGUiIHN0eWxlPSJtYXJnaW46MCAw IDAgLjhleDtib3JkZXItbGVmdDoxcHggI2NjYyBzb2xpZDtwYWRkaW5nLWxlZnQ6MWV4Ij48ZGl2 IHN0eWxlPSJ3b3JkLXdyYXA6YnJlYWstd29yZCI+PGRpdiBjbGFzcz0ibV83NDg2MzE1MzE0MDUy NjA5MzcxYmxvb3BfbWFya2Rvd24iPjxwPklzIHRoZSB0aHJvd2luZyB0eXBlIGFsd2F5cyBhIHBy b3RvY29sPyBJbiB5b3VyIGV4YW1wbGUgaXQgaXMsIGJ1dCBpcyB0aGlzIGdvaW5nIHRvIGJlIGFs d2F5cyB0aGUgY2FzZT88L3A+PC9kaXY+PC9kaXY+PC9ibG9ja3F1b3RlPjxkaXY+SSB0aG91Z2h0 IGl0IHdhcyBnb2luZyB0byBiZSBhbnkgb25lIHN1YnR5cGUgb2YgYEVycm9yYCwgYmUgaXQgYSBz dHJ1Y3QsIGFuIGVudW0sIG9yIGEgcHJvdG9jb2wgZXhpc3RlbnRpYWwsIG9yIGBFcnJvcmAgaXRz ZWxmLjwvZGl2PjwvZGl2PjwvZGl2Pg==" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">
</div>
</div>
</div>
</div></div></span></blockquote></div></div></div><div class="m_1653627348615050552bloop_markdown"><p></p></div></div><br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div></div></div></div>