<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 9 Nov 2016, at 16:55, Karl &lt;<a href="mailto:raziel.im+swift-evo@gmail.com" class="">raziel.im+swift-evo@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">If the compiler can’t infer T (such as “let a = nil”), it should fall-back to Optional&lt;Any&gt;.none; I’m very surprised that this isn’t the case currently.</div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">Oh, it is the case currently:</div><div class=""><br class=""></div><div class="">let a = nil</div><div class="">error: repl.swift:1:9: error: 'nil' requires a contextual type</div><div class=""><br class=""></div><div class="">I’m not familiar with why the compiler needs _OptionalNilComparisonType in order to compare to “nil”, but I would guess it could be improved to recognise the literal natively if removing this protocol is a significant concern.</div><div class=""><br class=""></div><div class="">- Karl</div></body></html>