[swift-users] type casting for Dictionaries keys
Седых Александр
se-a at mail.ru
Thu Mar 23 06:07:16 CDT 2017
Hello again :)
I have another question.
Why Type casting for Keys of Dictionaries don't work
enum Key {
case one
}
let dict: [ AnyHashable : Any ] = [ Key . one : "Hello" ]
let unwrap: [ Key : Any ] = dict as ! [ Key : Any ] // error
--
Седых Александр
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170323/63d9ed9f/attachment.html>
More information about the swift-users
mailing list