<html><head></head><body>There is no universal `nil`. `nil` is typed. That said think of `nil` as a shorthand form for `Optional&lt;YourType&gt;.none`<br> <br><div class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">--&nbsp;<br>Adrian Zubarev<br>Sent with Airmail</div></div> <p class="gmail_quote" style="color:#000;">Am 23. Januar 2017 um 11:24:18, Седых Александр via swift-users (<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>) schrieb:</p> <blockquote type="cite" class="gmail_quote"><span><div><div></div><div>


<title></title>


Hello.<br>
I have a simple expression with Any and is not work. Why?<br>
<br>
<p style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" data-mce-style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">
<span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;">var</span>
<span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">dictarray:
[[</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #703daa;">String</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">:</span>
<span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;">Any</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">]] =
[[</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #d12f1b;">"kek"</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">:</span>
<span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;">nil</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">]]&nbsp;<br>
<br>
\\ Nil is not compatible with expected dictionary value type
'Any'<br>
<br>
<br>
<br></span></p>
<br>
--<br>
<br>
And in other hand this is work<br>
<br>
<p style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" data-mce-style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">
<span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;">var</span>
<span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">dictarray:
[[</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #703daa;">String</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">:</span>
<span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;">Any</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">]] =
[[:]] &nbsp;\\ [[:]], <span style="font-family: Menlo; font-size: 11px;" data-mce-style="font-family: Menlo; font-size: 11px;">dictarray</span>.count =
1</span></p>
<br>
<br>
<br>
Седых Александр


_______________________________________________<br>swift-users mailing list<br>swift-users@swift.org<br>https://lists.swift.org/mailman/listinfo/swift-users<br></div></div></span></blockquote></body></html>