ios - 发布版本中的 Liker 错误 - 函数签名专门化 <Arg[2] = Exploded>

标签 ios swift swift3 xcode8

此代码在调试模式下构建良好(Xcode8.0):

private func rebuildMyClass3sForMyClassCache() {
    someWorker.fetchClass1Categories { (categories: [MyClass2]) in
        self.representedMyClass3sForMyClass1 = categories
            .flatMap { $0.class1s.sorted(by: { (a: MyClass1, b: MyClass1) -> Bool in
                return (a.priorityWithinCategory ?? 0) < (b.priorityWithinCategory ?? 0)
            })
    }
            // we want to show MyClass1 sections only for MyClass1s that actually contain MyClass3s
    .filter { $0.belongingMyClass3s.count > 0 }
}

但在构建Release时出现链接器错误:

Showing Recent Issues   "Swift.UnsafeMutableBufferPointer.(subscript.materializeForSet : (Swift.Int) -> A).(closure #1)", referenced from:

function signature specialization <Arg[2] = Exploded> of generic specialization
<Swift.UnsafeMutableBufferPointer<MessagesExtension.MyClass1> with
Swift.UnsafeMutableBufferPointer<MessagesExtension.MyClass1> :
Swift.MutableCollection in Swift and
Swift.UnsafeMutableBufferPointer<MessagesExtension.MyClass1> :
Swift.RandomAccessCollection in Swift> of Swift._siftDown <A where A:
Swift.MutableCollection, A: Swift.RandomAccessCollection> (inout A, index : A.Index, subRange : Swift.Range<A.Index>, by : inout (A.Iterator.Element, A.Iterator.Element) -> Swift.Bool) -> () in ManageMyClass3sInteractor.o

this Question建议禁用编译器优化,这 在我看来,这不是发布的选项。

最佳答案

事实证明这是一个 Xcode 8.0 错误。

更新到 Xcode 8.1 修复了该问题。

关于ios - 发布版本中的 Liker 错误 - 函数签名专门化 <Arg[2] = Exploded>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40318709/

相关文章:

ios - Swift 4 - 更新隐私设置 CLLocationManager 后刷新 View

ios - iOS 中的 Alamofire 正在接收字典而不是数组

ios - Firebase Swift 3 数据库在 setValue withCompletionBlock 上崩溃

ios - 如何缩小 UILabel 行之间的间距而不剪切标签?

ios - 如何测试 PHImageResultIsInCloudKey?

ios - 如何在 iOS 应用程序中加载初始 UIViewController?

android - 如何在 Android 中的 iOS 模拟器(如 emu/cider 应用程序)上运行我的 iOS 应用程序?

swift - 如何获取结构的 bundle ?

ios - 弱委托(delegate)变为零

ios - 适用于 iOS 的 GoogleMaps SDK - SWIFT 3 : When hiding a marker and then adding the map view back, CPU 卡在 100%