[swift-users] @NSCopying semantic does not appear to copy in Swift initializer

Quinn "The Eskimo!" eskimo1 at apple.com
Mon Jan 30 02:51:27 CST 2017


On 27 Jan 2017, at 18:56, Jordan Rose via swift-users <swift-users at swift.org> wrote:

> @NSCopying currently does not affect initializers.  … it's not 100%, for-sure a bug.

Just by way of context, this current behaviour closely matches Objective-C conventions, where `-init` methods directly access ivars and are expected to do any necessary copies.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware




More information about the swift-users mailing list