<div dir="ltr">I don’t see what there is to be confused about.<div><br></div><div>A “literal” is literally a bunch of characters in source code. The compiler interprets those characters as representing whatever type is appropriate to the context.</div><div><br></div><div>For the case at hand, a boolean literal can be interpreted as any type which conforms to the ExpressibleByBooleanLiteral protocol. If the context provides no information, the compiler defaults to interpreting a boolean literal as representing a Bool.</div><div><br></div><div>The situation is similar for every other kind of literal. For example, “2” defaults to being interpreted as an Int, but if the context requires a Double then it will be interpreted as a Double. The text “2” does not have a type of its own.</div><div><br></div><div>Nevin</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 21, 2016 at 3:55 PM, Rick Mann via swift-users <span dir="ltr">&lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On Nov 21, 2016, at 09:46 , Kenny Leung via swift-users &lt;<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; This is so confusing. &quot;Literals are untyped&quot;, but there’s a “BooleanLiteral”, which is obviously of type Boolean.<br>
<br>
</span>Agreed.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Rick Mann<br>
<a href="mailto:rmann@latencyzero.com">rmann@latencyzero.com</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br>
</div></div></blockquote></div><br></div>