No, I'm talking about the implicit discardability proposed by Brent, such as for all Optional<@discardable T>.<br><br>He proposes that the @discardable syntax has a strong motivating advantage because it can be extended in a way to mark _types_ so that return values of those types are always implicitly @discardable. That is:<br><br>@discardable class A { ... }<br>// any return value of type A is implicitly discardable<br>// what happens if A : Error and I throw A?<br><br>class B : A { ... }<br>// is any return value of type B also implicitly discardable?<br><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 19, 2017 at 01:02 Mike Kluev <<a href="mailto:mike.kluev@gmail.com">mike.kluev@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">On 19 October 2017 at 05:04, Xiaodi Wu <span dir="ltr"><<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>></span> wrote:<br></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="m_2864239085035406749gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div></div></div></blockquote></span><div><br></div><div>d) Does a class that override a `@discardable` type inherit that annotation? If not, they it's kind of a weird exception to the inheritance thing, no? If so, then we'd need a @nondiscardable annotation to do type-level overrides of @discardable.</div><div><br></div></div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>the very current form of @discardableResult as a function attribute leads to these type of questions in the first place. if it was a type modifier - there would be no doubt:</div><div><br></div><div>class A {</div><div> func foo() -> Bool {<br></div><div> ...</div><div> }</div><div><br></div><div> func bar() -> discardable Bool {</div><div> ...</div><div> }</div><div>}</div><div><br></div><div>class B: A {</div><div> override func foo() -> discardable Bool { // ok, types compatible<br></div><div> ...</div><div> }</div><div><br></div><div> override func bar() -> Bool { // error. types mismatch</div><div> ...</div><div> }</div><div>}</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Mike</div><div><br></div></div></div></div></blockquote></div>