<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">C represents pointers the other way around; that declaration says only the <i class="">outer</i> pointer is nullable. There are two things going on here:</div><div class=""><br class=""></div><div class="">- Swift 2 made all pointers implicitly nullable, without using an optional type. Swift 3 makes that explicit.</div><div class="">- Swift 2 had a bug that assumed that all pointers-to-references were optional, instead of just those without nullability annotations. Swift 3 "fixes" that…but that reveals places where headers used _Nonnull to mean "always produces a nonnull pointer", forgetting that it also applies to input.</div><div class=""><br class=""></div><div class="">If this is an API in CloudKit itself, please file a Radar at <a href="http://bugreport.apple.com" class="">bugreport.apple.com</a>. If it's a third-party library built on CloudKit, you'll have to report the issue to them.</div><div class=""><br class=""></div><div class="">Sorry for the trouble!</div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 20, 2016, at 10:32, Michael Gardner via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">I'm using an Objective-C library that has me provide a callback that takes a double-pointer parameter like this, where only the inner pointer is nullable:<br class=""><br class="">CKRecord *_Nonnull *_Nullable inOutRecordPtr<br class=""><br class="">Swift 2 imported this as an AutoreleasingUnsafeMutablePointer<CKRecord?>, as expected. However, Swift 3 is importing it as AutoreleasingUnsafeMutablePointer<CKRecord>?, which breaks the library's API since there's no way to return a new record.<br class=""><br class="">Is this a Swift 3 bug, or am I missing something?<br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></div></blockquote></div><br class=""></body></html>