<HTML><BODY>Hello again :)<br><br>I have another question.<br><br>Why Type casting for Keys of Dictionaries don't 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;">enum</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;"> Key {</span></p><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;" 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;">case</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;"> one</span></p><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;" data-mce-style="font-variant-ligatures: no-common-ligatures;">}</span></p><p style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" data-mce-style="margin-bottom: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;"> </p><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;">let</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;"> dict: [</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #703daa;">AnyHashable</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: #4f8187;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">Key</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: #31595d;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #31595d;">one</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;">"Hello"</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;">]</span></p><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;">let</span><span style="font-variant-ligatures: no-common-ligatures;" data-mce-style="font-variant-ligatures: no-common-ligatures;"> unwrap: [</span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">Key</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: #4f8187;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">dict </span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #ba2da2;">as</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: #4f8187;" data-mce-style="font-variant-ligatures: no-common-ligatures; color: #4f8187;">Key</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;">] // error</span></p><br><br><br>-- <br>Седых Александр</BODY></HTML>