ios - Xcode 10 Generics typealias Segmentation Fault 11 归档时
问题描述
在Xcode 10上归档时出现分段错误
笔记:
- Xcode 10在设备和模拟器上构建和运行正常,在 Xcode 9.4 中也归档、构建和运行正常
我的代码:
typealias ResponseBlock<T> = (_ sender: T) -> Void
我在整个项目中都使用它,例如:
var callback: ResponseBlock<AnyObject>?
在 Xcode 10 上归档时出错:
- 在生成 Objective-C 标头时
- 打印时......
- 打印类型 'ResponseBlock<[IndexPath]>' (声明于.....] RangeText="typealias ResponseBlock = (_ sender: T) -> V")
- 打印类型“(T)” 错误:分段错误:11
用法:
var refreshCells: ResponseBlock<[IndexPath]>?
viewModel.refreshCells = {indexPathList in
self.collectionView.reloadItems(at: indexPathList)
}
解决方案
推荐阅读
- solidity - 配置松露`from`地址的最佳方法
- rx-java2 - RxJava 流转换
- python - 如何使用 Neupy 获得由神经元表示的点
- java - 在自定义 Keycloak SPI Authenticator 中处理用户的取消
- react-native - IOS 上的不透明边框颜色未正确呈现
- apache-kafka - 避免 kafka 磁盘成为 100% 被 Cron 作业使用
- java - 如何在 RecyclerView 中显示项目的条件?
- angular - 如何在角度使用chart.js
- javascript - 将已部署的合约地址设置到前端配置的最佳方法
- javascript - 如何在 Content Grabber 中使用 C# 调用 javascript 函数?