协议扩展实现功能错误时,XCode 7.2崩溃

时间:2016-02-16 08:20:02

标签: crash swift2 protocols xcode7.2 sourcekitservice

不确定是否有其他人遇到此问题,但以下代码会导致XCode立即错误地退出,而SourceKitService意外退出'有时会导致XCode完全崩溃。

当我在扩展程序中更改了协议函数的默认实现时,我在项目中遇到了这个场景,但忘记更改协议中的声明以匹配。

protocol Crash{
        func crash(age: Int) ->String
    }

extension Crash{
    func crash(name: String) -> String{
        return "Test"
    }
}

class TestCrash: Crash{

}

1 个答案:

答案 0 :(得分:1)

此错误似乎已在Xcode 7.3 beta中修复。

Xcode 7.3b只是在消息中说明错误,不会再崩溃。

enter image description here