[swift-evolution] Casting Bug Swift

James Campbell james at supmenow.com
Thu Feb 25 10:44:41 CST 2016


Say I have been passed an array of objects that conform to a protocol
called "Eatable" i.e [Eatable]

If I then try to cast them to an array of classes who happen to implement
that protocol i.e [Burger]

The compiler lets me but in the runtime it corrupts the memory.

*___________________________________*

*James⎥iOS Lead*

*james at supmenow.com <james at supmenow.com>⎥supmenow.com <http://supmenow.com>*

*Sup*

*Runway East *

*10 Finsbury Square*

*London*

* EC2A 1AF *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160225/a08cef31/attachment.html>


More information about the swift-evolution mailing list