func loadMoreContent() {if let collection = self.ratingsCollection where collection.IDentifIEr != 0,let totalEntrIEs = collection.totalEntrIEs,let objects = self.ratings?.count where objects < totalEntrIEs { self.ratingsCollection = nil collection.nextPage().onSuccess { (value) in if let collection = value as? Collection<rating> { self.ratingsCollection = collection } else { self.ratingsCollection = Collection<rating>(IDentifIEr: 0) } }.onFailure { error in self.ratingsCollection = Collection<rating>(IDentifIEr: 0) } }}
以下是错误本身:
1. While type-checking 'loadMoreContent' at (path redacted).swift:46:32. While type-checking Expression at [(path redacted).swift:54:9 - line:64:9] RangeText="collection.nextPage().onSuccess { (value) in if let collection = value as? Collection<rating> { self.ratingsCollection = collection } else { self.ratingsCollection = Collection<rating>(IDentifIEr: 0) } }.onFailure { error in self.ratingsCollection = Collection<rating>(IDentifIEr: 0) }"3. While loading members for declaration 0x7fdda42ea2b0 at <invalID loc>4. While deserializing 'producer' (FuncDecl #340)
乍一看有没有人知道这个功能有什么问题?我应该添加它编译而不改变Xcode 6 / Swift 1.2.
解决方法 这是一个在XCode7中特别常见的拔毛错误.偶尔通常的XCode愚蠢错误协议(干净,XCode重启,清理,构建)修复它.但是,通常是由于一行或多行违规代码造成的.这并不一定意味着代码中也存在错误!
因此,在重新启动之前,有时可以按顺序撤消最近的更改并尝试按照您的方式进行构建.如果自上次成功构建以来您的任何依赖项或框架已更新,则这些可能是候选者.
有几件事情似乎经常产生这种错误.因此,如果您能够找出始终导致错误的特定问题,请简要地添加到此列表中:
1)在调用使用autoclosures的方法时使用plus运算符进行字符串连接(在调用XCGLogger时找到):
public func myFunc(@autoclosure closure: () -> String?){ // do something } someInstance.myFunc("Hi " + nameStr + "!")
2)无法从子类调用super.init(),特别是当超类使用默认初始化程序时(您没有显式创建自己的init)
3)偶然使用单个等号来测试相等性(使用=而不是==),尤其是在复杂的语句中,例如this answer.
总结以上是内存溢出为你收集整理的swift – 由于信号命令失败:分段错误:11 | Xcode 7.2全部内容,希望文章能够帮你解决swift – 由于信号命令失败:分段错误:11 | Xcode 7.2所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)