<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">The best way to deal with such situations should be typed throws. Then <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">rethrows</code> should be removed and replaced with generics in <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">throws</code> clause. <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">E == Never</code> ⇔ function does not throw.</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">struct FStore<E> {
let f: () throws(E) -> Void
init(_ f: @escaping () throws(E) -> Void) { self.f = f }
func call() throws(E) { try f() }
}
let store = FStore<Never>({ print("Hello") })
store.call()
</code></pre><p style="margin:0px 0px 1.2em!important">[Phase2]</p>
<div title="MDH:VGhlIGJlc3Qgd2F5IHRvIGRlYWwgd2l0aCBzdWNoIHNpdHVhdGlvbnMgc2hvdWxkIGJlIHR5cGVk
IHRocm93cy4gVGhlbiBgcmV0aHJvd3NgIHNob3VsZCBiZSByZW1vdmVkIGFuZCByZXBsYWNlZCB3
aXRoIGdlbmVyaWNzIGluIGB0aHJvd3NgIGNsYXVzZS4gYEUgP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